equal
deleted
inserted
replaced
118 } |
118 } |
119 |
119 |
120 //--------------------- Infrastructure --------------------------- |
120 //--------------------- Infrastructure --------------------------- |
121 static volatile int passed = 0, failed = 0; |
121 static volatile int passed = 0, failed = 0; |
122 static void pass() { passed++; } |
122 static void pass() { passed++; } |
123 static void fail() { failed++; (new Error("Failure")).printStackTrace(System.err); } |
123 static void fail() { failed++; new Error("Failure").printStackTrace(System.err); } |
124 static void fail(String msg) { failed++; (new Error("Failure: " + msg)).printStackTrace(System.err); } |
124 static void fail(String msg) { failed++; new Error("Failure: " + msg).printStackTrace(System.err); } |
125 static void unexpected(String msg, Throwable t) { System.err.println("Unexpected: " + msg); unexpected(t); } |
125 static void unexpected(String msg, Throwable t) { System.err.println("Unexpected: " + msg); unexpected(t); } |
126 static void unexpected(Throwable t) { failed++; t.printStackTrace(System.err); } |
126 static void unexpected(Throwable t) { failed++; t.printStackTrace(System.err); } |
127 static void check(boolean cond) { if (cond) pass(); else fail(); } |
127 static void check(boolean cond) { if (cond) pass(); else fail(); } |
128 static void check(String desc, boolean cond) { if (cond) pass(); else fail(desc); } |
128 static void check(String desc, boolean cond) { if (cond) pass(); else fail(desc); } |
129 static void equal(Object x, Object y) { |
129 static void equal(Object x, Object y) { |