On Wed, Feb 14, 2001 at 11:28:25PM +0100, Paul Johnson wrote:
> On Wed, Feb 14, 2001 at 07:27:10PM +0000, [EMAIL PROTECTED] wrote:
> 
> Same here.  But you have to edit the number of tests anyway, and I think
> you _should_ have to.

What's the benefit of maintaining a count?  Perl's a lot better at it
than I am.  Almost all of my test suites of late look vaguely like:


   use Test ;
   my @tests = (
   sub {
      ok( "rock", "rock" ) ;
   },
   sub {
      ok( "paper", "paper" ) ;
   },
   sub {
      ok( "scissors", "scissors" ) ;
   },
   ) ;

   plan tests => scalar @tests ;

   $_->() for @tests ;

I use the facet that Test prints our the line number of failing tests to
find what I broke.  Sheer bliss.  No, really ;-).

I've been very tempted to add in a todo(), that's like ok() but expects
a negative result.  I don't see any reason to have to predeclare the
todo list (I mean it's ok wtih me if people want to, I just hate
counting up tests).

- Barrie

Reply via email to