On Mon, Dec 17, 2001 at 11:48:34AM +0100, Tels wrote:
> What about the problem that can_ok() doesn't increase the testcount number
> by the number of methods, but only by one?

Like I said, I tried it that way, didn't like it and changed the
behavior.  Found myself having trouble keeping track of the test count
as @methods changed size.

The docs are now explicit about can_ok counting as a single test.
They also offer an alternative if you want the multiple increment
behavior:

    No matter how many @methods you check, a single can_ok() call counts
    as one test.  If you desire otherwise, use:

        foreach my $meth (@methods) {
            can_ok('Foo', $meth);
        }

That'll fail even if @methods is empty, the test count will be wrong.


> Contradicts the doc (and the changelog seems to contradict v0.17, since in
> v.017 it did increase by 1, too), also makes it hard to see whether can_ok()
> really does some looping or simple prints "ok $test\n";

The bug with can_ok() succeeding with no @methods has been fixed.
Trust your test library.  Or at least trust that things will be fixed
rapidly. :)


> Please make can_ok() increase the testcount by the number of methods.

Couldn't now even if I wanted to.  Been around too long, would break
too many tests.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
Stupid am I?  Stupid like a fox!

Reply via email to