Devel::Cover has been giving Test::More some indigestion lately.  Threads.
Bleh.  Paul put out a new version so I figured I'd try it out.  It faired
reasonably well, everything but the threaded stuff ran better than the
last version.

So I looked at the coverage output.  

---------------------------- ------ ------ ------ ------ ------ ------ ------
File                           stmt branch   cond    sub    pod   time  total
---------------------------- ------ ------ ------ ------ ------ ------ ------
blib/lib/Test/Builder.pm       92.3   79.7   66.7   96.6  100.0   76.5   87.0
blib/lib/Test/More.pm          95.0   90.6   82.2   94.4   95.2   22.8   92.9
blib/lib/Test/Simple.pm       100.0    n/a    n/a  100.0  100.0    0.7  100.0
Total                          93.5   83.5   72.8   96.0   98.2  100.0   89.4

Not bad.  Dug into Test::More's details.  Found a bunch of false negatives.
Devel::Cover doesn't seem to like "eval <<HEREDOC".  Its not useful to
check the 0 || 0 case of "my $class = ref $proto || $proto."  Some 
assertions that should never happen (the WHOA!s).

I came across one half of one conditional that wasn't getting tested.
So I figured, for completeness sake, I'd test it.  Whatdya know, that
feature was broken! [1]  And undocumented!

So even when you approach 100% there's still bugs to be found with
simple coverage analysis.


[1] For the record, its that the $how_many parameter of skip() and todo_skip()
is supposed to be optional when your plan is 'no_plan'.


-- 
Michael G Schwern        [EMAIL PROTECTED]  http://www.pobox.com/~schwern/
Don't step on my funk

Reply via email to