-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On 14-Oct-02 Michael G Schwern carved into stone:
> On Sun, Oct 13, 2002 at 04:01:10PM -0700, David Wheeler wrote:
> The explicit plan protects against:
> 
> 1. Your test dying.
> 2. Your test not printing tests to STDOUT
> 3. Exiting early via exit().

4. Developer editing testfile in vi and accidentily deleting 1 (or more)
   lines.
5. Your test messing up accidentily a loop variable in an
   iterative/looping test, and thus running way less tests than it should -
   and nobody noticed.
6. not running some tests for some reason other than 5, but related (I
   have tests that only run if the previous test was ok - if this goes wrong
   somehow (e.g. test WAS ok, but this is somehow ignored), some test would
   go missing)

Yes, it happened to me. Yes, reading the diff from one version to the next
and you could catch it (at least the "deleted line" stuff). But somehow I
prefer a plan. Maybe I am getting old and stuck in my ways :)

> 1. Makes writing SKIP blocks more difficult
> 2. Makes writing complex, iterative/looping tests more difficult

3. plan does not automatically protect you, especially when you just run the
suite and "count" the tests by looking at the highest number. Just having a
plan is not automatically better than having none. Well, I still prefer
plans (in all things) because I have a tidy (but somewhat absentminded)
mind.

I usually do "math" in the plan, e.g.:

infnan.t:

                # values    groups   oprators   classes   tests
  plan tests =>   7       * 6      * 5        * 4       * 2 +
                  7       * 6      * 2        * 4       * 1;    # bmod
  }

Works fine so far :o) (except that I misspelled opartors...drat!)

I am in favour of plan, but of course other people might disagree. As long
as most of the modules (like load.pm :-) come with highly insufficient
testsuites, we are probably worrying too much about the wrong problem :)

Cheers,

Te"To plan or not to plan, this is here the test"ls


- -- 
 perl -MDev::Bollocks -le'print Dev::Bollocks->rand()'
 dramatically scale front-end information

 http://bloodgate.com/perl       My current Perl projects
 PGP key available on http://bloodgate.com/tels.asc or via email

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBPatA+HcLPEOTuEwVAQHH7gf8C6MFc+5n3jfvqTri/OoyjO/llw+FusWv
MLLQoGPDY1H+GKOgE1XvrJLmHrjbsyXD6s3ZOV704Oitxb+RcHUDRxcOBNW8piCM
5LBB6NSa+BxaOwzXbBmkh521ivBb9kRrCqHug6YXgT1cDU0u6sUyjSq+/+Zrstwd
txFxBtqJCS3fNR+oV26nH81+vwOUwX5Bh+7a/+DgKQE8bhDJSnw+wXRN8Qj1mCe6
9WgCnbdOj/7sqmPqkbtMXmdHAtIZtXYFjCfia0T9UPwgceuiWegCHFuPvosPMNKT
61FXhGi7Ah4WOboHVuxm6DiGXbCoWJZQq4p0K+5PTUNyCkJS/d3CFg==
=N4N3
-----END PGP SIGNATURE-----

Reply via email to