Leif Eriksen wrote:
Hi,
I am doing some testing under Devel::Cover, and get some weird results sometimes. What should I be looking at in my code or test cases that is provoking this discrepancy?



Without D::C ++++++++++++++++++++++++++++++++++++++++++
[snip]
All tests successful.
Files=13, Tests=170, 7 wallclock secs ( 4.21 cusr + 0.39 csys = 4.60 CPU)
++++++++++++++++++++++++++++++++++++++++++


With D::C
./QualityBakers/t/FileSet...............dubious
Test returned status 0 (wstat 11, 0xb)
./QualityBakers/t/RecordSet.............ok 32/0# Looks like your test died just after 32.
./QualityBakers/t/RecordSet.............dubious
Test returned status 255 (wstat 65280, 0xff00)
after all the subtests completed successfully
./WeeklyStatement/t/ColumnHeader........ok
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------


./QualityBakers/t/FileSet.t 0 11 ?? ?? % ??
./QualityBakers/t/RecordSet.t 255 65280 32 0 0.00% ??
Failed 2/13 test scripts, 84.62% okay. -22/91 subtests failed, 124.18% okay.



Look for code that sneaks past perl under normal circumstances but not under the heightened scrutiny which Devel::Cover provides. Several months back I experienced a problem (can't find the e-mail posting right now) where I had code that had worked *for years* *in a module which repeatedly passed all its tests on CPAN* that had a test fail under Devel::Cover. I was dereferencing a multi-level hash or array and had the wrong sigil up front. Devel::Cover caught it.


jimk

Reply via email to