[Windmill-dev] Negating assertions?

Robert Leftwich windmill at rtl.fmailbox.com
Wed Dec 19 17:05:57 PST 2007


(Sorry for the delay, I was away from the office)

On Wed, 19 Dec 2007 15:50:05 -0800, "Adam Christian"
<adam at osafoundation.org> said:
> Okay so for syntax here:
> 	1. asserts.not.assertNode (not sure if this is possible)
> 	2. asserts.notAssertNode
> 	3. asserts.asserNodeNot
> 	4. asserts.!assertNode (not sure if this is possible either)
> 

I'm partial to the failIf/Unless convention, so how about:

  5. asserts.failIfNode

which also works (for me, at least) in the other cases 

asserts.failIfValue
asserts.failIfImageLoaded
asserts.failIfSelected
asserts.failIfChecked
...

If that is too different to the existing approach then it could still
use assert, i.e. 

asserts.assertIfNode
asserts.assertIfValue
asserts.assertIfImageLoaded
asserts.assertIfSelected
asserts.assertIfChecked
...

Another option might be to support both approaches, i.e. the existing
assertNode / assertIfNode and also failUnlessNode / failIfNode for those
people who work that way in unittest?

Robert


More information about the Windmill-dev mailing list