Browse Source

Make org.apache.tools.ant.taskdefs.optional.sitraka.ClassFileTest pass under

JDK 1.2
PR: 23919
Submitted by: Martijn Kruithof (ant at kruithof dot xs4all dot nl)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275568 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 21 years ago
parent
commit
fc275eb2e5
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java

+ 6
- 1
src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java View File

@@ -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);
}


Loading…
Cancel
Save