On Thu, Jul 27, 2000 at 03:08:43PM -0400, Barrie Slaymaker wrote:
> Michael G Schwern wrote:
> > Regression tests should be embedded in the code and documentation near what
> > it is they're testing.
> 
> s/embedded/embeddable/ and I'm there.  I don't think you can necessarily
> embed tests right near the code you want to test, and some tests
> don't necessarily belong to a particular module or piece of code.

Oh, don't worry.  I have no intention of getting rid of the .t files.
I guess I have to be really careful about how i word those one
sentence synopsises.


> Some thoughts:
> 
> This isn't POD, and it would confuse all the POD parsers out there.  How
> about extending Test::Harness to scan for /^sub TEST_\d+/ and running them
> in order?  A 

Several problems.

Perl will have to compile all the test routines all the time.  This
both slows startup and eats memory.  This pretty much kills the
proposal. :(

I don't see how the "sub TEST" thing improves except to keep POD pure
documentation.  '=for testing' works just fine for this.  As does
'=begin testing/=end testing'.  (You're right about '=test', so we
might want to drop that.)

Writing out a whole subroutine for each test is too much work.  I
really want these to be tests on the order of a line or three.  I'd
like code authors to simply toss them in on a whim, similar to an
assert().  Larger tests can be accomidatd with '=begin/=end testing'
and also the traditional .t files.


-- 

Michael G Schwern      http://www.pobox.com/~schwern/      [EMAIL PROTECTED]
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
i gave them some paste
do that funky dance, white boy
i laughed my ass off
        -- Fmh

Reply via email to