httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie Cookie_pm
Date Sun, 25 Jul 2004 16:01:46 GMT
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

Mime
View raw message