>> I have to agree with Tony. I think it's important to explicitly
>> indicate the number of tests that a given method runs, and to be
>> explicit about saying when you're not sure how many tests there will
>> be. In that regard, I like the current design better, although I would
>>  have no complaint if you decided to change the string "no_plan" to
>> something else.
>
> Me too. In that I'd not like "no plan" to be the default. I'd like it to
> be necessary to explicitly choose no plan. I'm not sure if it is helpful
> (or even a good interface) but it's possible to count the number of
> arguments in @_, and thereby distinguish between no arguments and 1
> undef argument. It's just that saying "pass a literal undef for no plan"
> is about as clear as "no_plan". Empty string is probably clearer, and
> quite easy to test for (with length, after a defined || croak test)

I'm still just learning the perl Test tools, and obviously a week behind
on my email :o, but I thought I'd give my opinion anyway.  From everything
I've seen, I think the idea of being able to say "This is going to run 4
tests ... blah blah blah ... This has run 4 of 4 tests" is nicer than
"This is going to run ? tests ... blah blah blah ... This has run 3 of ?
tests".

Partially, as others have said, if it says "this has run 3 of 4" now i
know something went AWOL :!  Likewise if it comes up "This has run 5 of 4
tests" I know I need to update my "This will run 4 tests" bit (or does
perl scream and rant and rave if you run more tests than you stated up
front?  /me admits to not having tried it personally yet)

Likewise, I definitely like the option, when I'm doing some quick testing
or preliminary work (there's virtually no code, and I keep adding tests
.... I don't want to have to update the number every time right NOW!) of
being able to say "There are N tests.  N is a number." and being done with
it ...

I can also see the downside of the N version being a default, b/c people
will probably tend to using the default if it works for them, and the N
solution seems like it would always work, just not optimally.  Maybe
making no default would be a good idea, so they either specifically state
"There are N tests" or they specifically state "There are 4 tests".  If
they don't specifically state it spits up an error "There is no testing
information!  You must explicitly state the testing structure!!!"

And just to prevent people from tossing in "undef" at the beginning and
leaving it, maybe also an output at the beginning and end (after it says
"I ran 5 of N tests") that states explicitly "You have not defined a
number of tests yet"

Just some thoughts I had on the topic, now that I'm catching up on my mail
finally ...

--attriel


Reply via email to