Closed GoogleCodeExporter closed 8 years ago
I see two challenges here. First, such a "power assert block" needs to be
detected statically so that we can rewrite it. Second, it might be confusing to
have implicit power asserts in some blocks (e.g. waitFor {}) but not in others
(e.g. collection.every {}). All in all, I wonder if this is worth the troubles
over explicit use of 'assert'.
Original comment by pnied...@gmail.com
on 4 Oct 2011 at 7:59
I can't comment much on the first challenge, but the second one seems a bit
weak to me. If this waitFor method is part of Spock then that seems like it
would be a clear enough distinction.
Whether it's worth it or not I can't really answer because I am not sure how
difficult the rewriting is. I do know that I've wanted something like this
several times and it's always cumbersome.
Original comment by luke.da...@gradle.biz
on 4 Oct 2011 at 8:14
> If this waitFor method is part of Spock then that seems like it would be a
clear enough distinction.
If at all I'd want to have this as a general mechanism.
> I do know that I've wanted something like this several times and it's always
cumbersome.
What exactly is cumbersome? Explicit use of 'assert'?
Original comment by pnied...@gmail.com
on 4 Oct 2011 at 8:20
That and that assert statements have no value.
Original comment by luke.da...@gradle.biz
on 4 Oct 2011 at 8:24
No value? You'll still get a ConditionNotSatisfiedError from which you can get
to the assertion message (if that's what you are worrying about).
Original comment by pnied...@gmail.com
on 4 Oct 2011 at 8:30
There's now PollingConditions and @ConditionBlock.
Original comment by pnied...@gmail.com
on 4 Oct 2012 at 7:14
Original issue reported on code.google.com by
luke.da...@gradle.biz
on 30 Sep 2011 at 1:10