barries <[EMAIL PROTECTED]> writes:

> On Thu, Feb 15, 2001 at 05:05:47PM -0500, [EMAIL PROTECTED] wrote:
> > On Thu, Feb 15, 2001 at 01:38:22PM -0500, barries wrote:
> > > What do folks think of adding something like the following to Test.pm:
> > <snicker-snatch>
> > > 
> > > This would make for very succinct easy to maintain test suites, if your
> > > test suite is simple enough:
> > > 
> > >    use Test qw( do_tests ) ;
> > > 
> > >    do_all_tests(
> > >       frobnitz => sub {
> > >    ok( 1 ) ;
> > >       },
> > >       skip => sub {
> > >    ok( 1 ) ;
> > >       },
> > >       todo => sub {
> > >          ok( 1 ) ;
> > >       },
> > >    ) ;
> > 
> > What does this gain you over the more flexible and easier to learn and write:
> 
> It's no more difficult to learn except for having to deal with closures.
> Which is a pain when dealing with tests that need to pass state from one
> to the next (say to check multiple results, or in situations where you
> need to sample a starting condition that figures in to the expected
> results some how).
> 
> Indeed, parts are simpler: both the current skip() and the proposed
> todo() are a little misguided: they do not skip the test, that's up to
> you.

Surely the todo stuff should always run the test and complain if it
succeeds. That's why there's a distinction between 'todo' and 'skip'.

-- 
Piers

Reply via email to