On Sat, Aug 02, 2003 at 05:02:58PM +0100, Adrian Howard wrote:
> >Or even more trivially, take Test::AtRuntime and swap
> >out Test::Builder::ok() with something that dies on failure.
> [snip]
>
> I was thinking about the ability to have an assertion block - so you
> could do (something like):
>
> ASSERT {
> isa_ok($_[0], 'Foo');
> ok( $_[1], 'non-false value');
> };
>
> and get a single die reporting all failing tests in the block. So it
> would need something a little more sneaky than overriding T::B::ok.
If an ASSERT just translates into:
{
my $test_num = Test::Builder->current_test;
isa_ok($_[0], 'Foo');
ok( $_[1], 'non-false value' );
assert(0) if anything_has_failed_since($test_num);
}
well then there ya go.
--
Don't be a lover, girl, I'd like to shamelessly hump your inner child.