develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [PATCH pod/perlhack.pod t/op/pack.t] Fixing bad testing advice

From:
Mark-Jason Dominus
Date:
August 28, 2001 06:17
Subject:
Re: [PATCH pod/perlhack.pod t/op/pack.t] Fixing bad testing advice
Message ID:
20010828131714.12913.qmail@plover.com

> It's bad enough having to count the ocurrences of the ok() function to
> find out *which* test failed; and it's made considerably worse when,
> as is often the case, some of the ok()s are in loops.

I've had good results in the past with an ok() function that use
caller() to find the line number of the offending test and included
the line number in the output:

        not ok 113    # line 374 of basic.t




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