Package org.jacoco.core.internal.flow

Examples of org.jacoco.core.internal.flow.MethodProbesVisitor.visitEnd()


  @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


  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

  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
Copyright © 2018 www.massapi.com. 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.