ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@antbuild.com>
Subject AW: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java
Date Mon, 27 Oct 2003 19:11:50 GMT
You are right Martijn, I will revert to your original patch.
Cheers,
Antoine

-----Ursprungliche Nachricht-----
Von: Martijn Kruithof [mailto:martijn@kruithof.xs4all.nl]
Gesendet: Montag, 27. Oktober 2003 20:05
An: Ant Developers List
Betreff: Re: cvs commit:
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
ClassFileTest.java


Hi

I also verified my patch against jdk 1.4.2 and IBM jdk 1.4.1 and am sure
it keeps running.
The numerals in assertHasMethod are lower limits according to the test
case, so the if is not necessery and furthermore makes in necessary to
also verify again against jdk 1.3 and ibm jdk's. Furthermore it may
become lower with future java versions again. When looking at the code
one would not necessarily expect more than one line in the method (empty
constructor). Therefore I had not put the if statement in there.

Kind Regards, Martijn

antoine@apache.org wrote:

>antoine     2003/10/27 10:32:13
>
>  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
>                        Tag: ANT_16_BRANCH ClassFileTest.java
>  Log:
>  Merge from HEAD
>  Prevent ClassFileTest from failing under JDK 1.2
>  PR: 23919
>  Submitted by: Martijn Kruithof
>
>  Revision  Changes    Path
>  No                   revision
>  No                   revision
>  1.7.2.1   +6 -1
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTe
st.java
>
>  Index: ClassFileTest.java
>  ===================================================================
>  RCS file:
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/C
lassFileTest.java,v
>  retrieving revision 1.7
>  retrieving revision 1.7.2.1
>  diff -u -r1.7 -r1.7.2.1
>  --- ClassFileTest.java	10 Feb 2003 14:14:54 -0000	1.7
>  +++ ClassFileTest.java	27 Oct 2003 18:32:13 -0000	1.7.2.1
>  @@ -65,6 +65,7 @@
>    * 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 @@
>           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);
>       }
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
>For additional commands, e-mail: dev-help@ant.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message