Skip to content

Commit f6a165d

Browse files
committed
Lab test fix: stop at first mismatch
1 parent 92093a6 commit f6a165d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/imgproc/test/test_color.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,14 +2369,15 @@ TEST(Imgproc_ColorLab_Full, bitExactness)
23692369

23702370
RNG rng(0);
23712371
// blueIdx x srgb x direction
2372-
for(int c = 0; c < 8; c++)
2372+
bool next = true;
2373+
for(int c = 0; next && c < 8; c++)
23732374
{
23742375
int v = c;
23752376
int blueIdx = (v % 2 != 0) ? 2 : 0; v /=2;
23762377
bool srgb = (v % 2 == 0); v /= 2;
23772378
bool forward = (v % 2 == 0);
23782379

2379-
for(int iter = 0; iter < nIterations; iter++)
2380+
for(int iter = 0; next && iter < nIterations; iter++)
23802381
{
23812382
Mat probe(256, 256, CV_8UC3), result;
23822383
rng.fill(probe, RNG::UNIFORM, 0, 255, true);
@@ -2392,7 +2393,6 @@ TEST(Imgproc_ColorLab_Full, bitExactness)
23922393

23932394
vector<uchar> goldBuf(probe.cols*4);
23942395
uchar* goldRow = &goldBuf[0];
2395-
bool next = true;
23962396
for(int y = 0; next && y < probe.rows; y++)
23972397
{
23982398
uchar* probeRow = probe.ptr(y);

0 commit comments

Comments
 (0)