use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CyclomaticComplexityTest method testNestedIf2.
@Test
public void testNestedIf2() throws Exception {
instrument(NestedIf.class);
target.test(-1);
final ICounter complexity = analyze();
assertEquals(CounterImpl.getInstance(2, 1), complexity);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CyclomaticComplexityTest method testIf1.
@Test
public void testIf1() throws Exception {
instrument(If.class);
final ICounter complexity = analyze();
assertEquals(CounterImpl.getInstance(2, 0), complexity);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CyclomaticComplexityTest method testIf3.
@Test
public void testIf3() throws Exception {
instrument(If.class);
target.test(0);
target.test(1);
final ICounter complexity = analyze();
assertEquals(CounterImpl.getInstance(0, 2), complexity);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CyclomaticComplexityTest method testSimple2.
@Test
public void testSimple2() throws Exception {
instrument(Simple.class);
target.test(0);
final ICounter complexity = analyze();
assertEquals(CounterImpl.getInstance(0, 1), complexity);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CyclomaticComplexityTest method testTwoIf1.
@Test
public void testTwoIf1() throws Exception {
instrument(TwoIf.class);
final ICounter complexity = analyze();
assertEquals(CounterImpl.getInstance(3, 0), complexity);
}
Aggregations