[antunit] A fail task

View: New views
3 Messages — Rating Filter:   Alert me  

[antunit] A fail task

by Nicolas Lalevée :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have some use case where I need to fail no matter what. Basically I  
need a task corresponding to the junit.framework.Assert#fail().

To implement it I suggest we implement it like the fail Ant task.  
Actually I suggest to rename "assertTrue" to "fail" in the  
antlib.xml(or "failure", "testFail" to not conflict with Ant's fail  
task ?), change the AssertTask so it will throw the  
AssertionFailedException if no condition is provided, and add a macro  
for assertTrue.

WDYT ?

Nicolas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: [antunit] A fail task

by Stefan Bodewig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-10-17, Nicolas Lalevée <nicolas.lalevee@...> wrote:

> I have some use case where I need to fail no matter what. Basically I
> need a task corresponding to the junit.framework.Assert#fail().

> To implement it I suggest we implement it like the fail Ant
> task. Actually I suggest to rename "assertTrue" to "fail" in the
> antlib.xml

I wanted to shout stop here until I saw the last part of the sentence.

> (or "failure", "testFail" to not conflict with Ant's fail task ?),

No reason to do that, they live in different XML namespaces.

> change the AssertTask so it will throw the AssertionFailedException if
> no condition is provided, and add a macro for assertTrue.

Fine with me.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: [antunit] A fail task

by Nicolas Lalevée :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Le 21 oct. 09 à 07:32, Stefan Bodewig a écrit :

> On 2009-10-17, Nicolas Lalevée <nicolas.lalevee@...> wrote:
>
>> I have some use case where I need to fail no matter what. Basically I
>> need a task corresponding to the junit.framework.Assert#fail().
>
>> To implement it I suggest we implement it like the fail Ant
>> task. Actually I suggest to rename "assertTrue" to "fail" in the
>> antlib.xml
>
> I wanted to shout stop here until I saw the last part of the sentence.
>
>> (or "failure", "testFail" to not conflict with Ant's fail task ?),
>
> No reason to do that, they live in different XML namespaces.
>
>> change the AssertTask so it will throw the AssertionFailedException  
>> if
>> no condition is provided, and add a macro for assertTrue.
>
> Fine with me.
>

done !

Nicolas


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...