summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/net/sf/antcontrib/logic/Assert.java4
-rw-r--r--test/resources/logic/asserttest.xml16
2 files changed, 4 insertions, 16 deletions
diff --git a/src/java/net/sf/antcontrib/logic/Assert.java b/src/java/net/sf/antcontrib/logic/Assert.java
index eb5654a..7c77964 100644
--- a/src/java/net/sf/antcontrib/logic/Assert.java
+++ b/src/java/net/sf/antcontrib/logic/Assert.java
@@ -53,6 +53,10 @@ public class Assert
tasks.add(task);
}
+ public BooleanConditionBase createBool() {
+ return this;
+ }
+
public void execute() {
if (countConditions() == 0) {
throw new BuildException("There is no condition specified.");
diff --git a/test/resources/logic/asserttest.xml b/test/resources/logic/asserttest.xml
index 2e920e2..8502299 100644
--- a/test/resources/logic/asserttest.xml
+++ b/test/resources/logic/asserttest.xml
@@ -28,58 +28,42 @@
<!-- test boolean conditions -->
<target name="test4">
<assert>
- <bool>
<isgreaterthan arg1="6.02" arg2="4"/>
- </bool>
</assert>
<assert>
- <bool>
<isgreaterthan arg1="Many" arg2="Less"/>
- </bool>
</assert>
</target>
<target name="test5">
<assert>
- <bool>
<islessthan arg1="6.02" arg2="23.456"/>
- </bool>
</assert>
<assert>
- <bool>
<islessthan arg1="least" arg2="most"/>
- </bool>
</assert>
</target>
<target name="test6">
<property name="testprop" value="false"/>
<assert>
- <bool>
<ispropertyfalse property="testprop"/>
- </bool>
</assert>
</target>
<target name="test7">
<property name="testprop" value="no"/>
<assert>
- <bool>
<ispropertytrue property="testprop"/>
- </bool>
</assert>
</target>
<target name="test8">
<property name="testprop" value="yes"/>
<assert>
- <bool>
<ispropertytrue property="testprop"/>
- </bool>
</assert>
</target>
<target name="test9">
<property name="testprop" value="on"/>
<assert>
- <bool>
<ispropertyfalse property="testprop"/>
- </bool>
</assert>
</target>