MCPcopy Create free account
hub / github.com/spotbugs/spotbugs / testFail

Method testFail

spotbugsTestCases/src/java/RECTest.java:38–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37 // should fail -- catches E, but E not thrown
38 public void testFail() {
39 try {
40 for (int i = 0; i < 1000; i++)
41 for (int j = i; j < 1000; j++)
42 throwsNothing();
43 for (int i = 0; i < 1000; i++)
44 for (int j = i; j < 1000; j++)
45 throwsNothing();
46 } catch (Exception e) {
47 dontTriggerEmptyExceptionHandler();
48 }
49 }
50
51 // should fail -- catches E, but E not thrown
52 public void testFail2() {

Callers

nothing calls this directly

Calls 2

throwsNothingMethod · 0.95

Tested by

no test coverage detected