cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java

2003-10-28 Thread antoine
antoine 2003/10/28 01:33:41

  Modified:src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka
Tag: ANT_16_BRANCH ClassFileTest.java
  Log:
  Merge from HEAD
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.7.2.2   +2 -6  
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java
  
  Index: ClassFileTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java,v
  retrieving revision 1.7.2.1
  retrieving revision 1.7.2.2
  diff -u -r1.7.2.1 -r1.7.2.2
  --- ClassFileTest.java27 Oct 2003 18:32:13 -  1.7.2.1
  +++ ClassFileTest.java28 Oct 2003 09:33:41 -  1.7.2.2
  @@ -81,11 +81,7 @@
   assertEquals(ClassFileTest.java, clazzfile.getSourceFile());
   MethodInfo[] methods = clazzfile.getMethods();
   assertEquals(3, methods.length);
  -if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)) {
  -assertHasMethod(void init(), 1, methods);
  -} else {
  -assertHasMethod(void init(), 2, methods);
  -}
  +assertHasMethod(void init(), 1, methods);
   assertHasMethod(void testTwoLines(), 2, methods);
   assertHasMethod(void testOneLine(), 3, methods);
   }
  @@ -95,7 +91,7 @@
   for (int i = 0; i  methods.length; i++) {
   MethodInfo method = methods[i];
   if (methodsig.equals(method.getFullSignature())) {
  -
  +
   assertTrue(methodsig, method.getNumberOfLines() = line);
   return;
   }
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java

2003-10-27 Thread antoine
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  ChangesPath
  No   revision
  No   revision
  1.7.2.1   +6 -1  
ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java
  
  Index: ClassFileTest.java
  ===
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- ClassFileTest.java10 Feb 2003 14:14:54 -  1.7
  +++ ClassFileTest.java27 Oct 2003 18:32:13 -  1.7.2.1
  @@ -65,6 +65,7 @@
* Nothing special about this testcase...
*
* @author a href=mailto:[EMAIL PROTECTED]Stephane Bailliez/a
  + * @author a href=mailto:[EMAIL PROTECTED]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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java

2003-10-27 Thread Martijn Kruithof
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
[EMAIL PROTECTED] 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  ChangesPath
 No   revision
 No   revision
 1.7.2.1   +6 -1  ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.java
 
 Index: ClassFileTest.java
 ===
 RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka/ClassFileTest.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 -	1.7
 +++ ClassFileTest.java	27 Oct 2003 18:32:13 -	1.7.2.1
 @@ -65,6 +65,7 @@
   * Nothing special about this testcase...
   *
   * @author a href=mailto:[EMAIL PROTECTED]Stephane Bailliez/a
 + * @author a href=mailto:[EMAIL PROTECTED]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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs/optional/sitraka ClassFileTest.java

2003-10-27 Thread Antoine Levy-Lambert
You are right Martijn, I will revert to your original patch.
Cheers,
Antoine

-Ursprungliche Nachricht-
Von: Martijn Kruithof [mailto:[EMAIL PROTECTED]
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

[EMAIL PROTECTED] 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  ChangesPath
  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 -  1.7
  +++ ClassFileTest.java   27 Oct 2003 18:32:13 -  1.7.2.1
  @@ -65,6 +65,7 @@
* Nothing special about this testcase...
*
* @author a href=mailto:[EMAIL PROTECTED]Stephane Bailliez/a
  + * @author a href=mailto:[EMAIL PROTECTED]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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]