You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2004/07/25 18:01:46 UTC

Re: cvs commit: httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie Cookie_pm

joes@apache.org wrote:
> joes        2004/07/24 23:00:56

>   +    ok 23 == join "", sort map $_->value, values %cookies;

before too many tests are written, just wanted to suggest that it's 
better to use:

is 23, join("", sort map $_->value, values %cookies), "testing values"

rather than

ok 23 == join "", sort map $_->value, values %cookies;

since if something goes wrong (e.g. for a user), you can ask them to run 
in a verbose mode and it'll show both the expected and received values, 
making it much easier to debug. Rather than just knowing that the test 
is ok or not.

Apache::TestUtil has t_cmp, and Test::More has a lot of wrappers like 
is, isnt, etc.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com