On Sat, Mar 17, 2001 at 01:19:02PM -1000, Tim Jenness wrote:
> On Sat, 17 Mar 2001, Paul Johnson wrote:
> 
> > My motivation for this simple interface is that I see little benefit to
> > me as a module author in being able to write
> >
> >   ok($x, 17);
> >
> > rather than
> >
> >   ok($x == 17);
> >
> > If anything, the latter is more explicit.  Think of it as removing all
> > special cases :-)
> 
> This is fine but the 2 arg version allows the test module to tell you
> *why* the two args did not match. One of the useful features of the test
> module is that it tells you both $x and 17 when they are not equal so that
> you can see the resaaon for the failure without having to add a print
> statemtnt to the test. The single argument ok() will just tell you a
> failure but not what the failure was.

This is an excellent point, and you are quite right that this is
extremely useful in this most common case.

I return to ponder mode for a while.  (Well sleep actually.)

> I think the skip() function should at least add "Skip" to the reason when
> printing it - the user of Test.pm should not need to know the format of a
> skip message required by Test::Harness.

Quite.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

Reply via email to