Hiya,

On Wednesday, June 25, 2003, at 07:09 pm, Fergal Daly wrote:

On Wednesday 25 June 2003 17:49, Adrian Howard wrote:
The thread from the start of May about having optional / extendable
plans supported by Test::Harness would seem to be a good match for this
feature.


        http://archive.develooper.com/[EMAIL PROTECTED]/msg01883.html (Plan is
YAGNI)
[snip]
I just thought of a big problem with plan extensions. If the script silently
eat's itself just before you extend the plan, then you don't know that
anything went wrong.

Add an explicit "test script finished" footer?


The problem is that counting the number of tests in a script is usually
somewhere between awkward and impossible. Extendable plans make the symptoms
go away but they also make some of the benefits of plans go away too.


Subblocks and subplans accomplish the same thing without any loss of
plan-strictness.
[snip]

I like the idea of sub-blocks/plans too (I still aim to tidy up Test::Block when the free time fairy next visits :) but I think the problems with extending plans can be overcome.

I have some vague thoughts that there are some potentially cute things that you could do with extended plans that would be hard to do with sub-blocks/plans (e.g. any sort of test that cross-cuts several test scripts in an AOPish sort of way - checking that test data has returned to a state of grace for example).

Anyway, food for thought.

Adrian



Reply via email to