Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Simple CPAN distribution.

Report information
The Basics
Id: 7022
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: adamk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.47
Fixed in: (no value)



Subject: Bad test count message should state actual count
When the number of tests executed differs from the expected, we get a message such as # Looks like you planned 9 tests but ran 5 extra. That's fine until you start doing comprehensive large-scale testing, where the actual tests to do are determined automatically, but you still want to plan the number, in case something that is determining which things to test goes wrong. I do this in a couple of cases, most notably Test::ClassAPI. After I've noted API changes for the new version, I run the test suite, note the change in test number, then update the plan declaration. I can add 9 + 4 in my head just fine, but when this starts to happen # Looks like you planned 929 tests but ran 576 extra. it gets a little more annoying. I propose you change the message at Test::Builder::_ending(/usr/lib/perl5/5.8.0/Test/Builder.pm:1338): 1338: $self->diag(<<"FAIL"); 1339: Looks like you planned $Expected_Tests tests but ran $num_extra extra. 1340: FAIL with something like "Looks like you planned $Expected_Tests tests but ran $num_extra extra ($Curr_Test)" or "Looks like you planned $Expected_Tests tests but actually ran $Curr_Test ($num_extra extra)" And I would assume the negative case should be changed as well. Regardless, you should mention the actual number as a conveniece, for the times when the 'ok xxx' lines arn't shown.
Better late than never.