Show only the first difference when images differ in the tests

The code was supposed to do this, but didn't, as "break" only broke from
the inner loop, but not the outer one, so replace it with "return".
This commit is contained in:
Vadim Zeitlin 2020-08-15 16:16:45 +02:00
parent 5324b9f184
commit ae1bcc5cb2

View File

@ -62,7 +62,9 @@ public:
"expected 0x%06x",
x, y, *d2, *d1
);
break;
// Don't show all mismatches, there may be too many of them.
return false;
}
++d1;
@ -70,6 +72,10 @@ public:
}
}
// We should never get here as we know that the images are different
// and so should have returned from inside the loop above.
wxFAIL_MSG("unreachable");
return false;
}