Search in sources :

Example 31 with ICounter

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

the class CounterImplTest method testEquals1.

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

Example 32 with ICounter

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

the class CounterImplTest method testFixInstance.

@Test
public void testFixInstance() {
    ICounter c1 = CounterImpl.getInstance(30, 30);
    ICounter c2 = CounterImpl.getInstance(30, 30);
    assertSame(c1, c2);
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Example 33 with ICounter

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

the class CounterImplTest method testVarInstance.

@Test
public void testVarInstance() {
    ICounter c1 = CounterImpl.getInstance(31, 30);
    ICounter c2 = CounterImpl.getInstance(31, 30);
    assertNotSame(c1, c2);
}
Also used : ICounter(org.jacoco.core.analysis.ICounter) Test(org.junit.Test)

Example 34 with ICounter

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

the class CounterImplTest method testGetMissedStatus2.

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

Example 35 with ICounter

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

the class CounterImplTest method testHashCode3.

@Test
public void testHashCode3() {
    ICounter c1 = CounterImpl.getInstance(300, 123);
    ICounter c2 = CounterImpl.getInstance(300, 124);
    assertFalse(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