Search in sources :

Example 26 with ICounter

use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.

the class CounterImplTest method testGetMissedStatus4.

@Test
public void testGetMissedStatus4() {
    ICounter c = CounterImpl.getInstance(2, 3);
    assertEquals(ICounter.PARTLY_COVERED, c.getStatus());
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Example 27 with ICounter

use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.

the class CounterImplTest method testEquals4.

@Test
public void testEquals4() {
    ICounter c = CounterImpl.getInstance(300, 123);
    assertFalse(c.equals(new Integer(123)));
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Example 28 with ICounter

use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.

the class CounterImplTest method testGetMissedStatus3.

@Test
public void testGetMissedStatus3() {
    ICounter c = CounterImpl.getInstance(0, 5);
    assertEquals(ICounter.FULLY_COVERED, c.getStatus());
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Example 29 with ICounter

use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.

the class CounterImplTest method testEquals2.

@Test
public void testEquals2() {
    ICounter c1 = CounterImpl.getInstance(300, 123);
    ICounter c2 = CounterImpl.getInstance(400, 123);
    assertFalse(c1.equals(c2));
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Example 30 with ICounter

use of org.jacoco.core.analysis.ICounter in project jacoco by jacoco.

the class CounterImplTest method testHashCode1.

@Test
public void testHashCode1() {
    ICounter c1 = CounterImpl.getInstance(300, 123);
    ICounter c2 = CounterImpl.getInstance(300, 123);
    assertEquals(c1.hashCode(), c2.hashCode());
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Aggregations

ICounter (org.jacoco.core.analysis.ICounter)50 Test (org.junit.Test)40 CounterEntity (org.jacoco.core.analysis.ICoverageNode.CounterEntity)2 FileWriter (java.io.FileWriter)1 PrintWriter (java.io.PrintWriter)1 Collection (java.util.Collection)1 List (java.util.List)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 IBundleCoverage (org.jacoco.core.analysis.IBundleCoverage)1 IClassCoverage (org.jacoco.core.analysis.IClassCoverage)1 ILine (org.jacoco.core.analysis.ILine)1 IMethodCoverage (org.jacoco.core.analysis.IMethodCoverage)1 IPackageCoverage (org.jacoco.core.analysis.IPackageCoverage)1 ISourceFileCoverage (org.jacoco.core.analysis.ISourceFileCoverage)1 Instruction (org.jacoco.core.internal.flow.Instruction)1 IReportVisitor (org.jacoco.report.IReportVisitor)1 ISourceFileLocator (org.jacoco.report.ISourceFileLocator)1 AbstractInsnNode (org.objectweb.asm.tree.AbstractInsnNode)1