72 |
|
s2.tailSet(Integer.MIN_VALUE)); |
73 |
|
} |
74 |
|
|
75 |
< |
static abstract class MapFrobber { abstract void frob(Map m); } |
76 |
< |
static abstract class SetFrobber { abstract void frob(Set s); } |
77 |
< |
static abstract class ColFrobber { abstract void frob(Collection c); } |
75 |
> |
abstract static class MapFrobber { abstract void frob(Map m); } |
76 |
> |
abstract static class SetFrobber { abstract void frob(Set s); } |
77 |
> |
abstract static class ColFrobber { abstract void frob(Collection c); } |
78 |
|
|
79 |
|
static ColFrobber adder(final int i) { |
80 |
|
return new ColFrobber() {void frob(Collection c) { c.add(i); }}; |
226 |
|
try {realMain(args);} catch (Throwable t) {unexpected(t);} |
227 |
|
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed); |
228 |
|
if (failed > 0) throw new AssertionError("Some tests failed");} |
229 |
< |
private static abstract class Fun {abstract void f() throws Throwable;} |
229 |
> |
private abstract static class Fun {abstract void f() throws Throwable;} |
230 |
|
static void THROWS(Class<? extends Throwable> k, Fun... fs) { |
231 |
|
for (Fun f : fs) |
232 |
|
try { f.f(); fail("Expected " + k.getName() + " not thrown"); } |
233 |
|
catch (Throwable t) { |
234 |
|
if (k.isAssignableFrom(t.getClass())) pass(); |
235 |
|
else unexpected(t);}} |
236 |
< |
private static abstract class CheckedThread extends Thread { |
236 |
> |
private abstract static class CheckedThread extends Thread { |
237 |
|
abstract void realRun() throws Throwable; |
238 |
|
public void run() { |
239 |
|
try {realRun();} catch (Throwable t) {unexpected(t);}}} |