ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r559393 - /ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java
Date Wed, 25 Jul 2007 10:49:05 GMT
Author: jhm
Date: Wed Jul 25 03:49:04 2007
New Revision: 559393

URL: http://svn.apache.org/viewvc?view=rev&rev=559393
Log:
Java 1.3 compatibility. (String.contains() is Java5+)

Modified:
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java?view=diff&rev=559393&r1=559392&r2=559393
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/JarTest.java Wed Jul 25 03:49:04
2007
@@ -274,30 +274,30 @@
     
     public void testNoVersionInfoIgnore() {
         executeTarget("testNoVersionInfoIgnore");
-        assertTrue( getFullLog().contains("No Implementation-Title set.") );
-        assertTrue( getFullLog().contains("No Implementation-Version set.") );
-        assertTrue( getFullLog().contains("No Implementation-Vendor set.") );
+        assertTrue( getFullLog().indexOf("No Implementation-Title set.") > -1 );
+        assertTrue( getFullLog().indexOf("No Implementation-Version set.") > -1 );
+        assertTrue( getFullLog().indexOf("No Implementation-Vendor set.") > -1 );
     }
 
     public void testNoVersionInfoWarn() {
         executeTarget("testNoVersionInfoWarn");
-        assertTrue( getLog().contains("No Implementation-Title set.") );
-        assertTrue( getLog().contains("No Implementation-Version set.") );
-        assertTrue( getLog().contains("No Implementation-Vendor set.") );
+        assertTrue( getLog().indexOf("No Implementation-Title set.") > -1 );
+        assertTrue( getLog().indexOf("No Implementation-Version set.") > -1 );
+        assertTrue( getLog().indexOf("No Implementation-Vendor set.") > -1 );
     }
 
     public void testNoVersionInfoNoStrict() {
         executeTarget("testNoVersionInfoNoStrict");
-        assertFalse( getLog().contains("No Implementation-Title set.") );
-        assertFalse( getLog().contains("No Implementation-Version set.") );
-        assertFalse( getLog().contains("No Implementation-Vendor set.") );
+        assertFalse( getLog().indexOf("No Implementation-Title set.") > -1 );
+        assertFalse( getLog().indexOf("No Implementation-Version set.") > -1 );
+        assertFalse( getLog().indexOf("No Implementation-Vendor set.") > -1 );
     }
     
     public void testHasVersionInfo() {
         executeTarget("testHasVersionInfo");
-        assertFalse( getLog().contains("No Implementation-Title set.") );
-        assertFalse( getLog().contains("No Implementation-Version set.") );
-        assertFalse( getLog().contains("No Implementation-Vendor set.") );
+        assertFalse( getLog().indexOf("No Implementation-Title set.") > -1 );
+        assertFalse( getLog().indexOf("No Implementation-Version set.") > -1 );
+        assertFalse( getLog().indexOf("No Implementation-Vendor set.") > -1 );
     }
     
 }



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


Mime
View raw message