815 |
|
} |
816 |
|
abstract static class Fun {abstract void f() throws Throwable;} |
817 |
|
static void THROWS(Class<? extends Throwable> k, Fun... fs) { |
818 |
< |
for (Fun f : fs) |
819 |
< |
try { f.f(); fail("Expected " + k.getName() + " not thrown"); } |
820 |
< |
catch (Throwable t) { |
821 |
< |
if (k.isAssignableFrom(t.getClass())) pass(); |
822 |
< |
else unexpected(t);}} |
818 |
> |
for (Fun f : fs) |
819 |
> |
try { f.f(); fail("Expected " + k.getName() + " not thrown"); } |
820 |
> |
catch (Throwable t) { |
821 |
> |
if (k.isAssignableFrom(t.getClass())) pass(); |
822 |
> |
else unexpected(t);}} |
823 |
|
static byte[] serializedForm(Object obj) { |
824 |
|
try { |
825 |
|
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |