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

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

Thread Previous | Thread Next
Michael G Schwern
August 28, 2001 07:16
Re: [PATCH pod/perlhack.pod t/op/pack.t] Fixing bad testing advice
Message ID:
On Tue, Aug 28, 2001 at 03:04:30PM +0100, Paul Marquess wrote:
> For core tests, I agree that a unified approach is a sensible idea. For
> external modules where the user may still be running 5.004, you have to roll
> your own solution.

Funny, Test::Simple and Test::More just happen to be explicitly tested
all the way back to 5.004. :)  I don't have eight copies of perl
installed for nothin'.

Ooop, thought I'd mentioned that in the docs.  I'll patch it in.

> I forgot to mention in my reply, but does this statement from t/TEST not
> also apply to the lower level tests in the harness?
>   # This is written in a peculiar style, since we're trying to avoid
>   # most of the constructs we'll be testing for.

Yes.  That's why they're not using Test::Simple.

> Does an ok sub make use of too many features in some of the tests?

It's a trade off.  You try to avoid using the features being tested in
the test itself.  So we obviously wouldn't use an ok() function if
we're doing basic function tests.  It's a calculated risk.  Balancing
the risk of a catastrophic feature failure rendering the test suite
useless and the risk of people not writing tests because it's too
arcane.  Right now, the problem is people don't write tests.

If we want to do it right, the really, really basic parts of t/op
should be broken out and put into t/base.  *wink wink, nudge nudge*


Michael G. Schwern   <>
Perl6 Quality Assurance     <>	     Kwalitee Is Job One
Lord of Kwalitee!  Wearer of the CPANTS and Slayer of Pseudo-hashes!

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About