131132133134135136137138
@Test public void testTwoIf2() throws Exception { instrument(TwoIf.class); target.test(-1); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(2, 1), complexity); }
140141142143144145146147
@Test public void testTwoIf3() throws Exception { instrument(TwoIf.class); target.test(-1); target.test(0); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(1, 2), complexity); }
149150151152153154155156
@Test public void testTwoIf4() throws Exception { instrument(TwoIf.class); target.test(-1); target.test(+1); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(0, 3), complexity); }
167168169170171172173174
} @Test public void testNestedIf1() throws Exception { instrument(NestedIf.class); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(3, 0), complexity); }
175176177178179180181182
@Test public void testNestedIf2() throws Exception { instrument(NestedIf.class); target.test(-1); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(2, 1), complexity); }
184185186187188189190191
@Test public void testNestedIf3() throws Exception { instrument(NestedIf.class); target.test(-1); target.test(0); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(1, 2), complexity); }
194195196197198199200201
public void testNestedIf4() throws Exception { instrument(NestedIf.class); target.test(-1); target.test(0); target.test(+1); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(0, 3), complexity); }
214215216217218219220221
} @Test public void testSwitch1() throws Exception { instrument(Switch.class); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(3, 0), complexity); }
222223224225226227228229
@Test public void testSwitch2() throws Exception { instrument(Switch.class); target.test(0); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(2, 1), complexity); }
231232233234235236237238
@Test public void testSwitch3() throws Exception { instrument(Switch.class); target.test(0); target.test(1); final ICounter complexity = analyze(); assertEquals(CounterImpl.getInstance(1, 2), complexity); }