Merge "HexDumpTest: Fix assertion."

This commit is contained in:
Tobias Thierer
2020-09-10 09:05:50 +00:00
committed by Android (Google) Code Review

View File

@@ -160,8 +160,9 @@ public final class HexDumpTest extends TestCase {
private static void assertThrows(Class<? extends RuntimeException> clazz, Runnable runnable) {
try {
runnable.run();
} catch (RuntimeException exception) {
assertEquals(toStrackTrace(exception), clazz, exception.getClass());
fail();
} catch (RuntimeException expected) {
assertEquals(toStrackTrace(expected), clazz, expected.getClass());
}
}