mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
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:
parent
6687d5772f
commit
51ade2ca96
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue