848 |
|
} |
849 |
|
interface Fun {void f() throws Throwable;} |
850 |
|
static void THROWS(Class<? extends Throwable> k, Fun... fs) { |
851 |
< |
for (Fun f : fs) |
852 |
< |
try { f.f(); fail("Expected " + k.getName() + " not thrown"); } |
853 |
< |
catch (Throwable t) { |
854 |
< |
if (k.isAssignableFrom(t.getClass())) pass(); |
855 |
< |
else unexpected(t);}} |
851 |
> |
for (Fun f : fs) |
852 |
> |
try { f.f(); fail("Expected " + k.getName() + " not thrown"); } |
853 |
> |
catch (Throwable t) { |
854 |
> |
if (k.isAssignableFrom(t.getClass())) pass(); |
855 |
> |
else unexpected(t);}} |
856 |
|
static byte[] serializedForm(Object obj) { |
857 |
|
try { |
858 |
|
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |