Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.ICounter


  @Test
  public void testTwoIf2() throws Exception {
    instrument(TwoIf.class);
    target.test(-1);
    final ICounter complexity = analyze();
    assertEquals(CounterImpl.getInstance(2, 1), complexity);
  }
View Full Code Here


  @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);
  }
View Full Code Here

  @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);
  }
View Full Code Here

  }

  @Test
  public void testNestedIf1() throws Exception {
    instrument(NestedIf.class);
    final ICounter complexity = analyze();
    assertEquals(CounterImpl.getInstance(3, 0), complexity);
  }
View Full Code Here

  @Test
  public void testNestedIf2() throws Exception {
    instrument(NestedIf.class);
    target.test(-1);
    final ICounter complexity = analyze();
    assertEquals(CounterImpl.getInstance(2, 1), complexity);
  }
View Full Code Here

  @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);
  }
View Full Code Here

  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);
  }
View Full Code Here

  }

  @Test
  public void testSwitch1() throws Exception {
    instrument(Switch.class);
    final ICounter complexity = analyze();
    assertEquals(CounterImpl.getInstance(3, 0), complexity);
  }
View Full Code Here

  @Test
  public void testSwitch2() throws Exception {
    instrument(Switch.class);
    target.test(0);
    final ICounter complexity = analyze();
    assertEquals(CounterImpl.getInstance(2, 1), complexity);
  }
View Full Code Here

  @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);
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.analysis.ICounter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.