Browse Source

Bug 48834 - BuildFileTest.assertPropertyUnset() could fail with a slightly more meaningful error message

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@917583 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 15 years ago
parent
commit
c30aceefbc
2 changed files with 11 additions and 3 deletions
  1. +5
    -1
      WHATSNEW
  2. +6
    -2
      src/tests/junit/org/apache/tools/ant/BuildFileTest.java

+ 5
- 1
WHATSNEW View File

@@ -74,7 +74,11 @@ Other changes:
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
======================================



+ 6
- 2
src/tests/junit/org/apache/tools/ant/BuildFileTest.java View File

@@ -428,8 +428,12 @@ public abstract class BuildFileTest extends TestCase {
*
* @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);
}
}

/**


Loading…
Cancel
Save