Search in sources :

Example 1 with IFrame

use of org.jacoco.core.internal.flow.IFrame in project jacoco by jacoco.

the class MethodInstrumenterTest method setup.

@Before
public void setup() {
    actual = new MethodRecorder();
    expected = new MethodRecorder();
    expectedVisitor = expected.getVisitor();
    final IProbeInserter probeInserter = new IProbeInserter() {

        public void insertProbe(int id) {
            actual.getVisitor().visitLdcInsn("Probe " + id);
        }
    };
    instrumenter = new MethodInstrumenter(actual.getVisitor(), probeInserter);
    frame = new IFrame() {

        public void accept(MethodVisitor mv) {
            mv.visitFrame(Opcodes.F_FULL, 0, null, 0, null);
        }
    };
}
Also used : IFrame(org.jacoco.core.internal.flow.IFrame) MethodRecorder(org.jacoco.core.instr.MethodRecorder) MethodVisitor(org.objectweb.asm.MethodVisitor) Before(org.junit.Before)

Aggregations

MethodRecorder (org.jacoco.core.instr.MethodRecorder)1 IFrame (org.jacoco.core.internal.flow.IFrame)1 Before (org.junit.Before)1 MethodVisitor (org.objectweb.asm.MethodVisitor)1