| 236 | } |
| 237 | |
| 238 | public static int finishTesting() { |
| 239 | assert runner.stack.isEmpty() : "Expected stack to be empty, got: " + runner.stack.toString(); |
| 240 | if (runner.messages.isEmpty()) { |
| 241 | System.out.println("] Asserts: " + runner.asserts + ", failures: " + runner.failures + ", errors: " + runner.errors); |
| 242 | } else { |
| 243 | System.out.println("]"); |
| 244 | for (String message: runner.messages) { |
| 245 | System.err.println(message + "\n"); |
| 246 | } |
| 247 | System.out.println("[ DONE ] Asserts: " + runner.asserts + ", failures: " + runner.failures + ", errors: " + runner.errors); |
| 248 | } |
| 249 | return runner.failures + runner.errors; |
| 250 | } |
| 251 | } |