ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs AvailableTest.java CopyTest.java ExecuteJavaTest.java ExecuteWatchdogTest.java FixCrLfTest.java
Date Tue, 23 Apr 2002 10:30:12 GMT
bodewig     02/04/23 03:30:12

  Modified:    src/testcases/org/apache/tools/ant ProjectTest.java
               src/testcases/org/apache/tools/ant/taskdefs
                        AvailableTest.java CopyTest.java
                        ExecuteJavaTest.java ExecuteWatchdogTest.java
                        FixCrLfTest.java
  Log:
  make tests use JavaEnvUtils.
  
  Revision  Changes    Path
  1.13      +2 -1      jakarta-ant/src/testcases/org/apache/tools/ant/ProjectTest.java
  
  Index: ProjectTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/ProjectTest.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ProjectTest.java	23 Apr 2002 07:27:20 -0000	1.12
  +++ ProjectTest.java	23 Apr 2002 10:30:12 -0000	1.13
  @@ -58,6 +58,7 @@
   import org.apache.tools.ant.input.InputHandler;
   import org.apache.tools.ant.input.PropertyFileInputHandler;
   import org.apache.tools.ant.types.*;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   
   import java.io.File;
   
  @@ -199,7 +200,7 @@
                * java full version "Linux_JDK_1.1.8_v3_green_threads"
                * from time to time
                */
  -            assertSame(Project.JAVA_1_1, p.getJavaVersion());
  +            assertTrue(JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1));
               assertTaskDefFails(DummyTaskProtected.class, 
                                  "No public no-arg constructor in " 
                                  + DummyTaskProtected.class);
  
  
  
  1.10      +2 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/AvailableTest.java
  
  Index: AvailableTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/AvailableTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AvailableTest.java	19 Mar 2002 22:45:06 -0000	1.9
  +++ AvailableTest.java	23 Apr 2002 10:30:12 -0000	1.10
  @@ -56,6 +56,7 @@
   
   import org.apache.tools.ant.BuildFileTest;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   
   /**
    * @author Nico Seessle <nico@seessle.de>
  @@ -200,7 +201,7 @@
   
       // Core class that exists in system classpath is ignored, but found in specified classpath
       public void test21() {
  -        if (project.getJavaVersion() == Project.JAVA_1_1) {
  +        if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
               // java.* classes are not found in JDK 1.1 even if specified in classpath attribute;
test24 shows correct operation
               return;
           }
  
  
  
  1.9       +2 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/CopyTest.java
  
  Index: CopyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/CopyTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CopyTest.java	6 Mar 2002 03:25:51 -0000	1.8
  +++ CopyTest.java	23 Apr 2002 10:30:12 -0000	1.9
  @@ -57,6 +57,7 @@
   import org.apache.tools.ant.BuildFileTest;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.FileUtils;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   import java.io.File;
   import java.io.IOException;
   
  @@ -118,7 +119,7 @@
           }
   
           //file time checks for java1.2+
  -        if (Project.getJavaVersion() != Project.JAVA_1_1) {
  +        if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
               assertTrue(file3a.lastModified()==file3.lastModified());
               assertTrue(file3c.lastModified()<file3a.lastModified());
           }
  
  
  
  1.2       +2 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java
  
  Index: ExecuteJavaTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/ExecuteJavaTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExecuteJavaTest.java	5 Apr 2002 12:56:34 -0000	1.1
  +++ ExecuteJavaTest.java	23 Apr 2002 10:30:12 -0000	1.2
  @@ -57,6 +57,7 @@
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Commandline;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   
   import java.io.File;
   
  @@ -135,7 +136,7 @@
           }
   
           // JDK 1.1 needs classes.zip in -classpath argument
  -        if (Project.getJavaVersion() == Project.JAVA_1_1) {
  +        if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
               classpath +=   File.pathSeparator
                   + System.getProperty("java.home")
                   + File.separator + "lib"
  
  
  
  1.11      +2 -2      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java
  
  Index: ExecuteWatchdogTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/ExecuteWatchdogTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ExecuteWatchdogTest.java	5 Apr 2002 12:56:34 -0000	1.10
  +++ ExecuteWatchdogTest.java	23 Apr 2002 10:30:12 -0000	1.11
  @@ -54,7 +54,7 @@
   
   package org.apache.tools.ant.taskdefs;
   
  -import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   
   import java.net.*;
   import junit.framework.*;
  @@ -96,7 +96,7 @@
           }
   
           // JDK 1.1 needs classes.zip in -classpath argument
  -        if (Project.getJavaVersion() == Project.JAVA_1_1) {
  +        if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
               classpath +=   File.pathSeparator
                   + System.getProperty("java.home")
                   + File.separator + "lib"
  
  
  
  1.10      +2 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java
  
  Index: FixCrLfTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/FixCrLfTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FixCrLfTest.java	23 Jan 2002 09:13:25 -0000	1.9
  +++ FixCrLfTest.java	23 Apr 2002 10:30:12 -0000	1.10
  @@ -59,6 +59,7 @@
   import junit.framework.AssertionFailedError;
   import org.apache.tools.ant.BuildFileTest;
   import org.apache.tools.ant.Project;
  +import org.apache.tools.ant.util.JavaEnvUtils;
   
   /**
    * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
  @@ -168,7 +169,7 @@
       }
   
       public void testEncoding() throws IOException { 
  -        if (project.getJavaVersion() == Project.JAVA_1_1) {
  +        if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
               // UTF16 is not supported in JDK 1.1
               return;
           }
  
  
  

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


Mime
View raw message