From: dswitkin Date: Thu, 10 Jul 2008 19:45:50 +0000 (+0000) Subject: Small improvement to unit test results output. X-Git-Url: http://git.rot13.org/?p=zxing.git;a=commitdiff_plain;h=f047e93290da66f1660e2ee654154bb9e5cba10d Small improvement to unit test results output. git-svn-id: http://zxing.googlecode.com/svn/trunk@510 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- diff --git a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java index eaa24630..826369d0 100644 --- a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java +++ b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java @@ -143,6 +143,7 @@ public abstract class AbstractBlackBoxTestCase extends TestCase { } } + // Print the results of all tests first 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 (" @@ -150,6 +151,10 @@ public abstract class AbstractBlackBoxTestCase extends TestCase { System.out.println(" " + tryHarderCounts[x] + " of " + imageFiles.length + " images passed with try harder (" + testResults.get(x).getTryHarderCount() + " required)"); + } + + // Then run through again and assert if any failed + for (int x = 0; x < testCount; x++) { assertTrue("Rotation " + testResults.get(x).getRotation() + " degrees: Too many images failed", passedCounts[x] >= testResults.get(x).getMustPassCount());