Package org.jacoco.core.instr

Examples of org.jacoco.core.instr.MethodRecorder


  private MethodRecorder actual;

  @Before
  public void setup() {
    actual = new MethodRecorder();
    expected = new MethodRecorder();
    probeArrayStrategy = new IProbeArrayStrategy() {

      public int pushInstance(MethodVisitor mv) {
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, "Target",
            "$jacocoInit", "()[Z");
View Full Code Here


  private MethodRecorder actual;

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

      public void insertProbe(int id) {
        actual.visitLdcInsn("Probe " + id);
      }
View Full Code Here

  private IProbeArrayStrategy arrayStrategy;

  @Before
  public void setup() {
    actual = new MethodRecorder();
    expected = new MethodRecorder();
    arrayStrategy = new IProbeArrayStrategy() {

      public int storeInstance(MethodVisitor mv, int variable) {
        mv.visitLdcInsn("init");
        return 5;
View Full Code Here

  private MethodRecorder expected;
  private MethodVisitor eliminator;

  @Before
  public void setup() {
    actual = new MethodRecorder();
    expected = new MethodRecorder();
    eliminator = new DuplicateFrameEliminator(actual);
  }
View Full Code Here

    label = new Label();
  }

  @After
  public void verify() {
    MethodRecorder actual = new MethodRecorder() {
      @Override
      public void visitLabel(Label label) {
        // Ignore labels inserted by the tracker
      }
    };
    FrameTracker tracker = new FrameTracker(actual, "Test");
    before.accept(tracker);
    mv.instructions.accept(tracker);
    tracker.insertFrame();

    MethodRecorder expected = new MethodRecorder();
    before.accept(expected);
    mv.instructions.accept(expected);
    after.accept(expected);

    assertEquals(expected, actual);
View Full Code Here

    label = new Label();
  }

  @After
  public void verify() {
    MethodRecorder actual = new MethodRecorder() {
      @Override
      public void visitLabel(Label label) {
        // Ignore labels inserted by the tracker
      }
    };
    FrameTracker tracker = new FrameTracker(actual, "Test");
    before.accept(tracker);
    mv.instructions.accept(tracker);
    tracker.insertFrame();

    MethodRecorder expected = new MethodRecorder();
    before.accept(expected);
    mv.instructions.accept(expected);
    after.accept(expected);

    assertEquals(expected, actual);
View Full Code Here

  private MethodRecorder actual;

  @Before
  public void setup() {
    actual = new MethodRecorder();
    expected = new MethodRecorder();
    probeArrayStrategy = new IProbeArrayStrategy() {

      public int pushInstance(MethodVisitor mv) {
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, "Target",
            "$jacocoInit", "()[Z");
View Full Code Here

  private MethodRecorder actual;

  @Before
  public void setup() {
    actual = new MethodRecorder();
    expected = new MethodRecorder();
    probeArrayStrategy = new IProbeArrayStrategy() {

      public int pushInstance(MethodVisitor mv) {
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, "Target",
            "$jacocoInit", "()[Z");
View Full Code Here

  private MethodVisitor expectedVisitor;

  @Before
  public void setup() {
    analyzer = new AnalyzerAdapter("Foo", 0, "doit", "()V", null);
    expected = new MethodRecorder();
    expectedVisitor = expected.getVisitor();
  }
View Full Code Here

    expectedVisitor = expected.getVisitor();
  }

  @After
  public void teardown() {
    MethodRecorder actual = new MethodRecorder();
    frame.accept(actual.getVisitor());
    assertEquals(expected, actual);
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.instr.MethodRecorder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.