feat: extend CliRunner with config file/batch mode and add comprehensive tests
CliRunner: - --batch / --config <file> flags trigger batch mode with directory scanning - collect_files() with recursive support and case-insensitive extension matching - build_pipeline() respects AppConfig conversion flags (invert toggle) - Progress output to stderr: "[1/42] Processing DSC09246.ARW..." Tests (test_pipeline.cpp): - AppConfig: load/save roundtrip, missing file error, extension parsing, format mapping, write_default - CropProcessor: levels adjustment, sharpening no-clip, empty image error - ColorCorrector: AWB preserves neutral grey, skips B&W film - Inverter: color negative changes values, B&W inversion, positive passthrough - Preprocessor: 8-bit→16-bit conversion test_rawloader.cpp: added missing <fstream> include Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,10 @@ target_include_directories(test_pipeline PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
target_compile_definitions(test_pipeline PRIVATE
|
||||
TEST_DATA_DIR="${CMAKE_SOURCE_DIR}/import"
|
||||
)
|
||||
|
||||
add_test(NAME PipelineTests COMMAND test_pipeline)
|
||||
|
||||
# ──────────────────────────────────────────────
|
||||
@@ -36,12 +40,8 @@ target_include_directories(test_rawloader PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
add_test(NAME RawLoaderTests COMMAND test_rawloader)
|
||||
|
||||
# Make test data path available
|
||||
target_compile_definitions(test_pipeline PRIVATE
|
||||
TEST_DATA_DIR="${CMAKE_SOURCE_DIR}/import"
|
||||
)
|
||||
target_compile_definitions(test_rawloader PRIVATE
|
||||
TEST_DATA_DIR="${CMAKE_SOURCE_DIR}/import"
|
||||
)
|
||||
|
||||
add_test(NAME RawLoaderTests COMMAND test_rawloader)
|
||||
|
||||
Reference in New Issue
Block a user