|
|
@@ -65,6 +65,7 @@ import org.apache.tools.ant.taskdefs.optional.sitraka.bytecode.MethodInfo; |
|
|
|
* Nothing special about this testcase... |
|
|
|
* |
|
|
|
* @author <a href="mailto:sbailliez@apache.org">Stephane Bailliez</a> |
|
|
|
* @author <a href="mailto:martijn@kruithof.xs4all.nl">Martijn Kruithof</a> |
|
|
|
*/ |
|
|
|
public class ClassFileTest extends TestCase { |
|
|
|
public ClassFileTest(String s) { |
|
|
@@ -80,7 +81,11 @@ public class ClassFileTest extends TestCase { |
|
|
|
assertEquals("ClassFileTest.java", clazzfile.getSourceFile()); |
|
|
|
MethodInfo[] methods = clazzfile.getMethods(); |
|
|
|
assertEquals(3, methods.length); |
|
|
|
assertHasMethod("void <init>()", 2, methods); |
|
|
|
if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)) { |
|
|
|
assertHasMethod("void <init>()", 1, methods); |
|
|
|
} else { |
|
|
|
assertHasMethod("void <init>()", 2, methods); |
|
|
|
} |
|
|
|
assertHasMethod("void testTwoLines()", 2, methods); |
|
|
|
assertHasMethod("void testOneLine()", 3, methods); |
|
|
|
} |
|
|
|