--- Bram <[EMAIL PROTECTED]> wrote:

> {
>    local $TODO = "test that foo() returns 1";
>    local $WAS = 3;
>    my $s1 = foo();
>    is($s1, "1");
> }

I really haven't thought through all of the ramifications of this, but
I like it.  I was recently complaining to Schwern about the issue with
TODO tests but didn't see this obvious solution :)

Case in point: working on a codebase once where my only unusual test
output was a TODO test and I happened to notice that the failure
changed after some refactoring.  This in turn led me to discover that
my underlying code had a bug which my TODO test was masking.

Alternatively, persistent TAP could potentially track TODO results and
handle the $WAS for you, but this is quite a ways off and has the
problem that we cannot always identify which tests are which.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/

Reply via email to