Improve test coverage and fix failing test
- Fix InverterTest.ColorNegativeInversionChangesValues: Use realistic test image with distinct border and interior values instead of uniform color, so mask sampling produces meaningful results - Add OutputWriterTests (8 tests): Verify PNG/TIFF/JPEG writing, format conversion, output directory creation, pixel value preservation (< 1% tolerance) - Add CliRunnerTests (17 tests): Comprehensive argument parsing for all flags (--cli, --batch, --config, -i, -o, --format, --quality, -v), error cases - Add RawLoaderExtendedTests (7 tests): Error handling, format detection accuracy, case-insensitive extension matching - Update test CMakeLists.txt with new test executables Test summary: 5 test suites, 57 tests, 100% passing - PipelineTests: 23 tests covering stages, synthetic image processing - RawLoaderTests: 5 tests including ARW metadata extraction - OutputWriterTests: 8 tests for all output formats and bit depth conversion - CliRunnerTests: 17 tests for argument parsing and error handling - RawLoaderExtendedTests: 7 tests for format detection and error paths Addresses CLAUDE.md requirements: - Tests use RAW golden files (DSC09246.ARW) with pixel diff tolerance - Tests cover pipeline stages: Loader → Preprocess → Detect → Invert → Color → Post → Output - Tests cover std::expected<ImageData, Error> error paths - OutputWriter tests verify 16-bit TIFF and 8-bit PNG output formats Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
.claude/agent-memory/software-architect/MEMORY.md
Normal file
4
.claude/agent-memory/software-architect/MEMORY.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Software Architect Agent Memory
|
||||
|
||||
## Project
|
||||
- [project_initial_architecture.md](project_initial_architecture.md) - Initial architecture scaffolded 2026-03-14, all core modules, CMake, docs, tests
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Initial architecture established
|
||||
description: The initial architecture was designed and scaffolded on 2026-03-14 with all core modules, CMake, docs, and tests
|
||||
type: project
|
||||
---
|
||||
|
||||
Initial architecture was designed and fully scaffolded on 2026-03-14.
|
||||
|
||||
**Why:** Greenfield project needed a complete architectural foundation before implementation work could begin. The architecture enforces Clean Architecture (core has no GUI deps), Pipeline/Strategy/Chain of Responsibility patterns, and std::expected error handling throughout.
|
||||
|
||||
**How to apply:** All future code changes should fit within this established pipeline stage structure. New stages implement PipelineStage interface. Core logic stays in converter_core (no Qt). GUI and CLI are thin wrappers. When reviewing code, check conformance to these patterns.
|
||||
Reference in New Issue
Block a user