On 22 Feb 2011, at 19:04, Andreas Delmelle wrote:

> On 22 Feb 2011, at 08:50, Simon Pepping wrote:
>> It would be nice if assertions were checked during the junit tests.
>> However, when I set: <junit ... jvm="java -ea"/>, I get
>> junit.framework.AssertionFailedError errors. How can this be done?
> Sounds like a good idea.
> IIC, simply using "-ea" would enable internal assertions for JUnit's classes 
> as well. 
> You probably want something like "-ea:org.apache.fop..." to make sure only 
> assertions in FOP's code are taken into account.

Tried that and failed.. :(

One way to enable assertions I found so far, and that seems to work:
- use fork="true" on the <junit> target
- insert: <assertions><enabled /></assertions> in that target

That seems to yield the expected behavior at first glance. Our junit targets 
are not forked, however. Not sure if that is preferable...



Reply via email to