Skip to content

Instantly share code, notes, and snippets.

@avandeursen
Created December 14, 2012 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avandeursen/4288830 to your computer and use it in GitHub Desktop.
Save avandeursen/4288830 to your computer and use it in GitHub Desktop.
Simple test case that passes normally, but fails when run with Jacoco instrumentation enabled -- since Jacoco generates an extra synthetic method for the classes it instruments.
public class JacocoTest {
public static class NoMethods { }
@Test public void testDeclaredMethod() {
assertEquals(0, NoMethods.class.getDeclaredMethods().length);
} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment