in reply to Testing at the right granularity

Provide a way to stringify your tree, then test that stringification against some $expected. If this means you have to write a stringify function, that's not a bad thing. If your tests want to do it, then your users will, as well.

Replies are listed 'Best First'.
Re^2: Testing at the right granularity
by polettix (Vicar) on Apr 19, 2005 at 18:10 UTC
    Your answer seems to imply that you suggest to stick to the "abbreviated" test flavour. Is this correct? And if so... why? I'm looking for motivations to take one path or another, so forgive me for all these questions.

    Flavio (perl -e "print(scalar(reverse('ti.xittelop@oivalf')))")

    Don't fool yourself.
      Are you wondering how many ok() calls to make or how many scenarios to test? It doesn't matter how many ok() calls you make per test scenario so long as you test enough scenarios.