RSS | Module Info | Add a review of Test

0 out of 5 found this review helpful:

Test (1.25) ***

Quick, tell what this does:

ok $d, 'valid diff';

If you answered "passes if $d evaluates to true, and sets the test name to 'a valid diff'", you're mistaken. The invocation will actually compare $d with the string 'valid diff'.

The problem is that ok() can be invoked with up to 3 parameters, and only the 3-parameter form allows you to specify a test name.

I prefer Test::Simple's (or Test::More's) interface, where it's clear that

ok $a, $b;

means that $a is the expression to evaluate and $b is the optional test name.

Dan Dascalescu - 2009-05-04 01:16:04
Was this review helpful to you?  Yes No


the camel