Skip to content

Commit

Permalink
Bug 48834 - BuildFileTest.assertPropertyUnset() could fail with a sli…
Browse files Browse the repository at this point in the history
…ghtly more meaningful error message

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@917583 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
steveloughran committed Mar 1, 2010
1 parent e83e17f commit c417d5d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion WHATSNEW
Original file line number Diff line number Diff line change
Expand Up @@ -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
======================================

Expand Down
8 changes: 6 additions & 2 deletions src/tests/junit/org/apache/tools/ant/BuildFileTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,12 @@ public void assertPropertySet(String property) {
*
* @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);
}
}

/**
Expand Down

0 comments on commit c417d5d

Please sign in to comment.