use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CounterImplTest method testGetCoveredRatio3.
@Test
public void testGetCoveredRatio3() {
ICounter c = CounterImpl.getInstance(0, 0);
assertEquals(Double.NaN, c.getCoveredRatio(), 0.0);
assertEquals(Double.NaN, c.getValue(CounterValue.COVEREDRATIO), 0.0);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CounterImplTest method testGetInstance1.
@Test
public void testGetInstance1() {
ICounter c = CounterImpl.getInstance(0, 0);
assertEquals(0, c.getTotalCount());
assertEquals(0.0, c.getValue(CounterValue.TOTALCOUNT), 0.0);
assertEquals(0, c.getMissedCount());
assertEquals(0.0, c.getValue(CounterValue.MISSEDCOUNT), 0.0);
assertEquals(0, c.getCoveredCount());
assertEquals(0.0, c.getValue(CounterValue.COVEREDCOUNT), 0.0);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CounterImplTest method testGetMissedRatio1.
@Test
public void testGetMissedRatio1() {
ICounter c = CounterImpl.getInstance(10, 30);
assertEquals(0.25, c.getMissedRatio(), 0.0);
assertEquals(0.25, c.getValue(CounterValue.MISSEDRATIO), 0.0);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CounterImplTest method testGetCoveredRatio1.
@Test
public void testGetCoveredRatio1() {
ICounter c = CounterImpl.getInstance(30, 10);
assertEquals(0.25, c.getCoveredRatio(), 0.0);
assertEquals(0.25, c.getValue(CounterValue.COVEREDRATIO), 0.0);
}
use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.
the class CounterImplTest method testEquals3.
@Test
public void testEquals3() {
ICounter c1 = CounterImpl.getInstance(300, 123);
ICounter c2 = CounterImpl.getInstance(300, 124);
assertFalse(c1.equals(c2));
}
Aggregations