Switch ASSERT macros to new stream API (#7881)

This commit is contained in:
Ben Doherty
2024-05-24 13:46:34 -07:00
committed by GitHub
parent 3ec2249b2a
commit cf91e42847
77 changed files with 854 additions and 799 deletions

View File

@@ -51,7 +51,7 @@ void updateOrCompare(LinearImage limgResult, const utils::Path& fnameGolden,
// Load the PNG file at the given path.
std::ifstream in(fnameGolden, std::ios::binary);
ASSERT_PRECONDITION(in, "Unable to open: %s", fnameGolden.c_str());
FILAMENT_CHECK_PRECONDITION(in) << "Unable to open: " << fnameGolden.c_str();
LinearImage limgGolden = ImageDecoder::decode(in, fnameGolden);
// Convert 4-channel RGBM into proper RGB.
@@ -67,7 +67,7 @@ void updateOrCompare(LinearImage limgResult, const utils::Path& fnameGolden,
}
// Perform a simple comparison of the two images.
ASSERT_PRECONDITION(compare(limgResult, limgGolden, epsilon) == 0, "Image mismatch.");
FILAMENT_CHECK_PRECONDITION(compare(limgResult, limgGolden, epsilon) == 0) << "Image mismatch.";
}
}