http://test-more.googlecode.com/files/Test-Simple-0.85_01.tar.gz
This latest release resolves a number of long outstanding issues in cmp_ok().
The biggest being this:
cmp_ok $object, '==', $number;
cmp_ok() would always stringify or numify its arguments, removing the
overloading. This meant that if $object had '==' overloaded it was not being
called!
The best example in the wild is DateTime which overloads '==' but disallows a
numeric representation.
use Test::More tests => 1;
use DateTime;
cmp_ok( DateTime->now, "==", DateTime->now )
Previous versions yielded this:
1..1
Cannot add 0 to a DateTime object (DateTime=HASH(0x190c740)).
Only a DateTime::Duration object can be added to a DateTime object. at
/Users/schwern/releases/Test-Simple-0.80/lib//Test/Builder.pm line 501
# Looks like your test died before it could output anything.
which was Test::Builder trying to "unoverload" the object. This latest
release compares them fine.
I expect this to cause a bit of fixage.
0.85_01 Thu Oct 23 18:57:38 PDT 2008
New Features
* cmp_ok() now displays the error if the comparison throws one.
For example, broken overloaded objects.
Bug Fixes
* cmp_ok() no longer stringifies or numifies its arguments before comparing.
This makes cmp_ok() properly test overloaded ops.
[rt.cpan.org 24186] [code.google.com 16]
* diag() properly escapes blank lines.
Feature Changes
* cmp_ok() now reports warnings and errors as coming from inside cmp_ok,
as well as reporting the caller's file and line. This let's the user
know where cmp_ok() was called from while reminding them that it is
being run in a different context.
Other
* Dependency on ExtUtils::MakeMaker 6.27 only on Windows otherwise the
nested tests won't run.
0.84 Wed Oct 15 09:06:12 EDT 2008
Other
* 0.82 accidentally shipped with experimental Mouse dependency.
0.82 Tue Oct 14 23:06:56 EDT 2008
Bug Fixes
- 0.81_01 broke $TODO such that $TODO = '' was considered todo.
--
52. Not allowed to yell "Take that Cobra" at the rifle range.
-- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
http://skippyslist.com/list/