Package org.jacoco.core.internal.flow

Examples of org.jacoco.core.internal.flow.MethodProbesVisitor


        null, null);
  }

  @Test
  public void testMethodFilter_Empty() {
    final MethodProbesVisitor mv = analyzer.visitMethod(0, "foo", "()V",
        null, null);
    mv.visitEnd();
    Collection<IMethodCoverage> methods = analyzer.getCoverage()
        .getMethods();
    assertEquals(0, methods.size());
  }
View Full Code Here


    assertEquals(0, methods.size());
  }

  @Test
  public void testMethodFilter_NonSynthetic() {
    final MethodProbesVisitor mv = analyzer.visitMethod(0, "foo", "()V",
        null, null);
    mv.visitCode();
    mv.visitInsn(Opcodes.RETURN);
    mv.visitEnd();
    Collection<IMethodCoverage> methods = analyzer.getCoverage()
        .getMethods();
    assertEquals(1, methods.size());
  }
View Full Code Here

    assertEquals(1, methods.size());
  }

  @Test
  public void testMethodFilter_Synthetic() {
    final MethodProbesVisitor mv = analyzer.visitMethod(
        Opcodes.ACC_SYNTHETIC, "foo", "()V", null, null);
    assertNull(mv);
    Collection<IMethodCoverage> methods = analyzer.getCoverage()
        .getMethods();
    assertTrue(methods.isEmpty());
View Full Code Here

    assertTrue(methods.isEmpty());
  }

  @Test
  public void testMethodFilter_Lambda() {
    final MethodProbesVisitor mv = analyzer.visitMethod(
        Opcodes.ACC_SYNTHETIC, "lambda$1", "()V", null, null);
    mv.visitCode();
    mv.visitInsn(Opcodes.RETURN);
    mv.visitEnd();
    Collection<IMethodCoverage> methods = analyzer.getCoverage()
        .getMethods();
    assertEquals(1, methods.size());
  }
View Full Code Here

TOP

Related Classes of org.jacoco.core.internal.flow.MethodProbesVisitor

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.