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

Method testFail6

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

Source from the content-addressed store, hash-verified

100 // should fail -- try catch could throw either of two exceptions, catches E,
101 // but E not thrown
102 public void testFail6() {
103 try {
104 for (int i = 0; i < 1000; i++)
105 for (int j = i; j < 1000; j++)
106 throwsNothing();
107 throwsTwoExceptions();
108 } catch (Exception e) {
109 dontTriggerEmptyExceptionHandler();
110 }
111 }
112
113 // should pass -- catches E, but E thrown
114 public void testPass() {

Callers

nothing calls this directly

Calls 3

throwsNothingMethod · 0.95
throwsTwoExceptionsMethod · 0.95

Tested by

no test coverage detected