Package org.jacoco.core.analysis

Examples of org.jacoco.core.analysis.ICounter


    assertEquals(15, c.getCoveredCount());
  }

  @Test
  public void testGetInstance3() {
    ICounter c = CounterImpl.getInstance(15, 12);
    ICounter copy = CounterImpl.getInstance(c);
    assertEquals(27, copy.getTotalCount());
    assertEquals(15, copy.getMissedCount());
    assertEquals(12, copy.getCoveredCount());
  }
View Full Code Here


    assertEquals(12, copy.getCoveredCount());
  }

  @Test
  public void testFixInstance() {
    ICounter c1 = CounterImpl.getInstance(30, 30);
    ICounter c2 = CounterImpl.getInstance(30, 30);
    assertSame(c1, c2);
  }
View Full Code Here

    assertSame(c1, c2);
  }

  @Test
  public void testVarInstance() {
    ICounter c1 = CounterImpl.getInstance(31, 30);
    ICounter c2 = CounterImpl.getInstance(31, 30);
    assertNotSame(c1, c2);
  }
View Full Code Here

    assertEquals(8, c.getCoveredCount());
  }

  @Test
  public void testGetCoveredRatio1() {
    ICounter c = CounterImpl.getInstance(30, 10);
    assertEquals(0.25, c.getCoveredRatio(), 0.0);
  }
View Full Code Here

    assertEquals(0.25, c.getCoveredRatio(), 0.0);
  }

  @Test
  public void testGetCoveredRatio2() {
    ICounter c = CounterImpl.getInstance(20, 0);
    assertEquals(0.0, c.getCoveredRatio(), 0.0);
  }
View Full Code Here

    assertEquals(0.0, c.getCoveredRatio(), 0.0);
  }

  @Test
  public void testGetCoveredRatio3() {
    ICounter c = CounterImpl.getInstance(0, 0);
    assertTrue(Double.isNaN(c.getCoveredRatio()));
  }
View Full Code Here

    assertTrue(Double.isNaN(c.getCoveredRatio()));
  }

  @Test
  public void testGetMissedRatio1() {
    ICounter c = CounterImpl.getInstance(10, 30);
    assertEquals(0.25, c.getMissedRatio(), 0.0);
  }
View Full Code Here

    assertEquals(0.25, c.getMissedRatio(), 0.0);
  }

  @Test
  public void testGetMissedRatio2() {
    ICounter c = CounterImpl.getInstance(0, 20);
    assertEquals(0.0, c.getMissedRatio(), 0.0);
  }
View Full Code Here

    assertEquals(0.0, c.getMissedRatio(), 0.0);
  }

  @Test
  public void testGetMissedRatio3() {
    ICounter c = CounterImpl.getInstance(0, 0);
    assertTrue(Double.isNaN(c.getMissedRatio()));
  }
View Full Code Here

    assertTrue(Double.isNaN(c.getMissedRatio()));
  }

  @Test
  public void testGetMissedStatus1() {
    ICounter c = CounterImpl.getInstance(0, 0);
    assertEquals(ICounter.EMPTY, c.getStatus());
  }
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.