use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class FrameSnapshotTest method teardown.
@After
public void teardown() {
MethodRecorder actual = new MethodRecorder();
frame.accept(actual.getVisitor());
assertEquals(expected, actual);
}
use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class FrameSnapshotTest method setup.
@Before
public void setup() {
analyzer = new AnalyzerAdapter("Foo", 0, "doit", "()V", null);
expected = new MethodRecorder();
expectedVisitor = expected.getVisitor();
}
use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class MethodProbesAdapterTest method setup.
@Before
public void setup() {
label = new Label();
id = 1000;
expected = new MethodRecorder();
expectedVisitor = new TraceAdapter(expected);
actual = new MethodRecorder();
MethodProbesVisitor actualVisitor = new TraceAdapter(actual);
MethodProbesAdapter probesAdapter = new MethodProbesAdapter(actualVisitor, this);
final AnalyzerAdapter analyzer = new AnalyzerAdapter("Foo", 0, "doit", "()V", probesAdapter);
probesAdapter.setAnalyzer(analyzer);
adapter = analyzer;
frame = new IFrame() {
public void accept(MethodVisitor mv) {
}
};
}
use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class DuplicateFrameEliminatorTest method setup.
@Before
public void setup() {
actual = new MethodRecorder();
expected = new MethodRecorder();
eliminator = new DuplicateFrameEliminator(actual.getVisitor());
}
use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class OfflineInstrumentationAccessGeneratorTest method testRuntimeClassName.
@Test
public void testRuntimeClassName() throws Exception {
generator = new OfflineInstrumentationAccessGenerator();
MethodRecorder actual = new MethodRecorder();
generator.generateDataAccessor(987654321, "foo/Bar", 17, actual.getVisitor());
MethodRecorder expected = new MethodRecorder();
expected.getVisitor().visitLdcInsn(Long.valueOf(987654321));
expected.getVisitor().visitLdcInsn("foo/Bar");
expected.getVisitor().visitIntInsn(Opcodes.BIPUSH, 17);
String rtname = JaCoCo.RUNTIMEPACKAGE.replace('.', '/') + "/Offline";
expected.getVisitor().visitMethodInsn(Opcodes.INVOKESTATIC, rtname, "getProbes", "(JLjava/lang/String;I)[Z", false);
assertEquals(expected, actual);
}
Aggregations