ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r917583 - in /ant/core/trunk: WHATSNEW src/tests/junit/org/apache/tools/ant/BuildFileTest.java
Date Mon, 01 Mar 2010 16:44:48 GMT
Author: stevel
Date: Mon Mar  1 16:44:48 2010
New Revision: 917583

URL: http://svn.apache.org/viewvc?rev=917583&view=rev
Log:
Bug 48834 -  BuildFileTest.assertPropertyUnset() could fail with a slightly more meaningful
error message

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/BuildFileTest.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=917583&r1=917582&r2=917583&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Mon Mar  1 16:44:48 2010
@@ -74,7 +74,11 @@
    of Object args as strings; previously only API-level usage of the
    equals condition allowed Object args, but Ant 1.8.x+ property
    evaluation may yield values of any type.
-
+   
+ * BuildFileTest.assertPropertyUnset() fails with a slightly more 
+   meaningful error message
+   Bugzilla Report 48834
+   
 Changes from Ant 1.8.0RC1 TO Ant 1.8.0
 ======================================
 

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/BuildFileTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/BuildFileTest.java?rev=917583&r1=917582&r2=917583&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/BuildFileTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/BuildFileTest.java Mon Mar  1 16:44:48
2010
@@ -428,8 +428,12 @@
      *
      * @param property property name
      */
-    public  void assertPropertyUnset(String property) {
-        assertPropertyEquals(property, null);
+    public void assertPropertyUnset(String property) {
+        String result = project.getProperty(property);
+        if (result != null) {
+            fail("Expected property " + property
+                    + " to be unset, but it is set to the value: " + result);
+        }
     }
 
     /**



Mime
View raw message