use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class MethodSanitizerTest method dump.
private MethodRecorder dump(MethodNode node) {
MethodRecorder rec = new MethodRecorder();
node.accept(rec.getVisitor());
return rec;
}
use of org.jacoco.core.instr.MethodRecorder 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);
}
};
}
use of org.jacoco.core.instr.MethodRecorder in project jacoco by jacoco.
the class ProbeInserterTest method setup.
@Before
public void setup() {
actual = new MethodRecorder();
actualVisitor = actual.getVisitor();
expected = new MethodRecorder();
expectedVisitor = expected.getVisitor();
arrayStrategy = new IProbeArrayStrategy() {
public int storeInstance(MethodVisitor mv, boolean clinit, int variable) {
mv.visitLdcInsn(clinit ? "clinit" : "init");
return 5;
}
public void addMembers(ClassVisitor delegate, int probeCount) {
}
};
}
Aggregations