ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java
Date Tue, 04 Feb 2003 13:53:52 GMT
conor       2003/02/04 05:53:52

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
                        ClassFileTest.java
  Log:
  Make this test pass on different JDK 1.4 minor versions
  
  PR:	15250
  
  Revision  Changes    Path
  1.5       +6 -12     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java
  
  Index: ClassFileTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ClassFileTest.java	20 Nov 2002 12:55:53 -0000	1.4
  +++ ClassFileTest.java	4 Feb 2003 13:53:52 -0000	1.5
  @@ -82,14 +82,7 @@
           assertEquals(3, methods.length);
           assertHasMethod("void <init>()", 2, methods);
           assertHasMethod("void testTwoLines()", 2, methods);
  -        assertHasMethod("void testOneLine()", 
  -                        // in JDK 1.4 we get four lines
  -                        3 + 
  -                        (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)
  -                         || JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)
  -                         || JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3)
  -                         ? 0 : 1),
  -                        methods);
  +        assertHasMethod("void testOneLine()", 3, methods);
       }
   
       protected void assertHasMethod(String methodsig, int line, MethodInfo[] methods) {
  @@ -97,7 +90,8 @@
           for (int i = 0; i < methods.length; i++) {
               MethodInfo method = methods[i];
               if (methodsig.equals(method.getFullSignature())) {
  -                assertEquals(methodsig, line, method.getNumberOfLines());
  +                
  +                assertTrue(methodsig, method.getNumberOfLines() >= line);
                   return;
               }
           }
  
  
  

Mime
View raw message