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 ProjectTest.java
Date Fri, 15 Feb 2002 16:51:10 GMT
bodewig     02/02/15 08:51:10

  Modified:    .        build.xml
               src/testcases/org/apache/tools/ant ProjectTest.java
  Log:
  Make tests pass on JDK 1.1.
  
  The change to ProjectTest basically backs out a change I had to make
  to Ralf Wiebicke's original submission to make it work on my box three
  months ago.  Since then nothing has changed, but my JDK now throws a
  different exception than it did back then - go figure.
  
  TimeZone doesn't seem to matter for JDK 1.1, testDateTimeISO fails as
  text is "2002-02-23T10:11:12" on my machine.  I ran out of time and
  disabled the test, but I promise to check back later. 8-)
  
  Revision  Changes    Path
  1.244     +4 -0      jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.243
  retrieving revision 1.244
  diff -u -r1.243 -r1.244
  --- build.xml	15 Feb 2002 15:19:17 -0000	1.243
  +++ build.xml	15 Feb 2002 16:51:10 -0000	1.244
  @@ -974,6 +974,10 @@
             <exclude name="${optional.package}/junit/JUnitTestRunnerTest.java"
                      unless="jdk1.2+" />
   
  +          <!-- DateTime handling seems to be broken in JDK 1.1 -->
  +          <exclude name="org/apache/tools/ant/util/DateUtilsTest.java"
  +                   unless="jdk1.2+" />
  +
             <!-- interactive test -->
             <exclude name="org/apache/tools/ant/taskdefs/TestProcess.java" />
   
  
  
  
  1.10      +6 -3      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ProjectTest.java	10 Jan 2002 10:13:11 -0000	1.9
  +++ ProjectTest.java	15 Feb 2002 16:51:10 -0000	1.10
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -58,6 +58,7 @@
   
   import java.io.File;
   
  +import junit.framework.AssertionFailedError;
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -185,15 +186,17 @@
   
           assertTaskDefFails(DummyTaskPrivate.class,   DummyTaskPrivate.class   + " is not
public");
   
  -        if (p.getJavaVersion() != Project.JAVA_1_1) {
  +        try {
               assertTaskDefFails(DummyTaskProtected.class, 
                                  DummyTaskProtected.class + " is not public");
  -        } else {
  +        } catch (AssertionFailedError e) {
               /*
                * I don't understand this, but this is what happens with
                * > java -fullversion
                * java full version "Linux_JDK_1.1.8_v3_green_threads"
  +             * from time to time
                */
  +            assertSame(Project.JAVA_1_1, p.getJavaVersion());
               assertTaskDefFails(DummyTaskProtected.class, 
                                  "No public default constructor in " 
                                  + DummyTaskProtected.class);
  
  
  

--
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