On 7/17/06, A. Pagaltzis <[EMAIL PROTECTED]> wrote:
so by now we've had quibbles about the "irregularity" of `skip`,
`can_ok` and `isa_ok`, and a suggestion that the test name always
go first.

This puts the emphesis on the wrong thing.  The point of the test is
the test, not the description.

Descriptions are optional because they are not necessary for the test.
Sometimes a test doesn't need a description, its obvious from reading
the code what its doing.  Sometimes it would be redundant.  Sometimes
you're just writing fast.  I write tests without descriptions all the
time.

Its not Test::More's job to enforce style.  The more things are
optional the more useful to more people it is.


Had they been named parameters, we wouldn't be having this
discussion.

   is got => 'foo', expected => 'bar', description => 'foo is bar';

   is 'foo', 'bar', 'foo is bar';

When you plan to use a function thousands of times, brevity is nice.
Same reason its "ok" and "is" and not "assert" and "assert_eq_string".

Your average test function has a very narrow interface:  what you got;
what you expected; maybe a name.  Not a whole lot of room for
confusion there.  Named params are nice when you have a wide
interface, or when you plan on expanding the interface later.

And no, I'm not going to add magic hash ref arguments to Test::More.
Part of its interface design is to be unambiguous and unmagical so
that bad input is not interpreted as some esoteric functionality
(contrast with Test.pm).

When Perl 6 rolls around we can do the named and positional argument thing.

Reply via email to