MCPcopy Create free account
hub / github.com/HumbleUI/Skija / assertThrows

Method assertThrows

tests/java/runner/TestRunner.java:213–223  ·  view source on GitHub ↗
(Class<? extends Throwable> expected, Executable executable)

Source from the content-addressed store, hash-verified

211 }
212
213 public static void assertThrows(Class<? extends Throwable> expected, Executable executable) {
214 try {
215 executable.execute();
216 runner.fail("Expected '" + expected.getName() + "', caught nothing");
217 } catch(Exception e) {
218 if (expected.isInstance(e))
219 runner.pass();
220 else
221 runner.fail("Expected '" + expected.getName() + "', caught '" + e + "'");
222 }
223 }
224
225 public static void assertDoesNotThrow(Executable executable) {
226 try {

Callers 6

abcMethod · 0.80
testVulkanContextMethod · 0.80
executeMethod · 0.80
utfConversionsMethod · 0.80
executeMethod · 0.80
iterMethod · 0.80

Calls 3

failMethod · 0.80
passMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected