< prev index next >

langtools/test/tools/lib/toolbox/TestRunner.java

Print this page




 100         if (testCount == 0) {
 101             throw new Error("no tests found");
 102         }
 103 
 104         StringBuilder summary = new StringBuilder();
 105         if (testCount != 1) {
 106             summary.append(testCount).append(" tests");
 107         }
 108         if (errorCount > 0) {
 109             if (summary.length() > 0) {
 110                 summary.append(", ");
 111             }
 112             summary.append(errorCount).append(" errors");
 113         }
 114         out.println(summary);
 115         if (errorCount > 0) {
 116             throw new Exception(errorCount + " errors found");
 117         }
 118     }
 119 
 120     public void error(String message) {
 121         out.println("Error: " + message);
 122         errorCount++;
 123     }
 124 }


 100         if (testCount == 0) {
 101             throw new Error("no tests found");
 102         }
 103 
 104         StringBuilder summary = new StringBuilder();
 105         if (testCount != 1) {
 106             summary.append(testCount).append(" tests");
 107         }
 108         if (errorCount > 0) {
 109             if (summary.length() > 0) {
 110                 summary.append(", ");
 111             }
 112             summary.append(errorCount).append(" errors");
 113         }
 114         out.println(summary);
 115         if (errorCount > 0) {
 116             throw new Exception(errorCount + " errors found");
 117         }
 118     }
 119 
 120     protected void error(String message) {
 121         out.println("Error: " + message);
 122         errorCount++;
 123     }
 124 }
< prev index next >