develooper Front page | perl.qa | Postings from January 2008

Re: Dude, where's my diagnostics? (Re: Halting on first testfailure)

Thread Previous | Thread Next
From:
Aristotle Pagaltzis
Date:
January 12, 2008 04:23
Subject:
Re: Dude, where's my diagnostics? (Re: Halting on first testfailure)
Message ID:
20080112122323.GC31184@klangraum
* Michael G Schwern <schwern@pobox.com> [2008-01-12 12:00]:
> Ovid wrote:
> > I'll go fix that diagnostic thing now. Unfortunately, I
> > think I'll have to violate encapsulation :(
> 
> If you know how to fix it let me know, because other than
> enumerating each testing module you might use and lex-wrapping
> all the functions they export, I'm not sure how to do it.

Set a flag that T::B should quit when the next test result is
about to be recorded?

> One possibility involves taking advantage of $Level, so at
> least Test::Builder knows which is the test function the user
> called, and then, somehow, inserting the code necessary to
> cause failure when that function exits. I don't know how you
> insert code to run when a function that's already being
> executed exits.

Load the debugger and set a breakpoint?

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About