Added better logging for our blackbox tests. It now displays the number of images which passes per test out of the total, and the percentage. It also warns when a blackbox test is too lax (i.e. we've made decoding improvements but haven't raised the high water mark).

git-svn-id: https://zxing.googlecode.com/svn/trunk@947 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2009-05-21 21:18:27 +00:00
parent 6687d5772f
commit 51ade2ca96

View file

@ -156,6 +156,8 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
}
// Print the results of all tests first
int totalFound = 0;
int totalMustPass = 0;
for (int x = 0; x < testCount; x++) {
System.out.println("Rotation " + testResults.get(x).getRotation() + " degrees:");
System.out.println(" " + passedCounts[x] + " of " + imageFiles.length + " images passed ("
@ -163,6 +165,17 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
System.out.println(" " + tryHarderCounts[x] + " of " + imageFiles.length +
" images passed with try harder (" + testResults.get(x).getTryHarderCount() +
" required)");
totalFound += passedCounts[x];
totalFound += tryHarderCounts[x];
totalMustPass += testResults.get(x).getMustPassCount();
totalMustPass += testResults.get(x).getTryHarderCount();
}
int totalTests = imageFiles.length * testCount * 2;
System.out.println("TOTALS:\n Decoded " + totalFound + " images out of " + totalTests +
" (" + (totalFound * 100 / totalTests) + "%)");
if (totalFound > totalMustPass) {
System.out.println(" *** Test too lax by " + (totalFound - totalMustPass) + " images");
}
// Then run through again and assert if any failed