I want to enable the assertion facility in ant
. In my ant build.xml
, I put the follows, trying to enable assertions.
<project> ...
<assertions>
<enable/>
</assertions>
</project>
I put assertion in a junit
file, which includes only one function,
testAssertions() {
assert false;
}
when running ant
, assertion fails are not thrown.. How to enable assertion in this setting?
It looks like your <assertions>
subelement is a child of <project>
, is this correct?
I am assuming that you are running the test via the <junit>
ant task. If this is correct, making the <assertions><enable/></assertions>
subelement a child of <junit>
should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With