Skip to content

Commit 4f1a2ce

Browse files
authored
Refactor tests to actually run and not exit silently as well as add new one for data-dir parameter (#200)
* Add tests for default path argument Signed-off-by: Aleksandr Motsjonov <[email protected]> * Add utility for less ifdef win32 code Signed-off-by: Aleksandr Motsjonov <[email protected]> * Fix exiting tests and add two more Signed-off-by: Aleksandr Motsjonov <[email protected]> * Fix windows part Signed-off-by: Aleksandr Motsjonov <[email protected]> * Fix test so order doesn't matter Signed-off-by: Aleksandr Motsjonov <[email protected]> * Find path for test in Win32 Signed-off-by: Aleksandr Motsjonov <[email protected]> * correct path Signed-off-by: Aleksandr Motsjonov <[email protected]> * try another path Signed-off-by: Aleksandr Motsjonov <[email protected]> * Last touch ups / PR review address Signed-off-by: Aleksandr Motsjonov <[email protected]> --------- Signed-off-by: Aleksandr Motsjonov <[email protected]>
1 parent f2192c3 commit 4f1a2ce

File tree

2 files changed

+243
-197
lines changed

2 files changed

+243
-197
lines changed

src/rawtoaces_util/image_converter.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ struct CameraIdentifier
4747
*
4848
* @param path The filesystem path to check
4949
* @param batch Reference to a vector of strings to add valid file paths to
50-
* @return true if the file was processed (either added to batch or filtered out),
51-
* false if the file should be ignored
5250
*/
5351
void check_and_add_file(
5452
const std::filesystem::path &path, std::vector<std::string> &batch )
@@ -1441,11 +1439,11 @@ bool ImageConverter::configure(
14411439
return false;
14421440
}
14431441

1444-
bool spectral_white_balance =
1442+
bool is_spectral_white_balance =
14451443
settings.WB_method == Settings::WBMethod::Illuminant;
1446-
bool spectral_matrix = matrix_method == Settings::MatrixMethod::Spectral;
1444+
bool is_spectral_matrix = matrix_method == Settings::MatrixMethod::Spectral;
14471445

1448-
if ( spectral_white_balance || spectral_matrix )
1446+
if ( is_spectral_white_balance || is_spectral_matrix )
14491447
{
14501448
if ( !prepare_transform_spectral(
14511449
image_spec,
@@ -1459,7 +1457,7 @@ bool ImageConverter::configure(
14591457
return false;
14601458
}
14611459

1462-
if ( spectral_white_balance )
1460+
if ( is_spectral_white_balance )
14631461
{
14641462
float custom_WB[4];
14651463

@@ -1582,9 +1580,9 @@ bool ImageConverter::configure(
15821580

15831581
if ( settings.crop_box[2] > 0 && settings.crop_box[3] > 0 )
15841582
{
1585-
std::cerr << " Crop box: [" << settings.crop_box[0] << ", "
1586-
<< settings.crop_box[1] << ", " << settings.crop_box[2]
1587-
<< ", " << settings.crop_box[3] << "]" << std::endl;
1583+
std::cerr << " Crop box: ["
1584+
<< OIIO::Strutil::join( settings.crop_box, ", " ) << "]"
1585+
<< std::endl;
15881586
}
15891587

15901588
std::cerr << " Demosaic: " << settings.demosaic_algorithm << std::endl;

0 commit comments

Comments
 (0)