develooper Front page | perl.qa | Postings from January 2005

Re: Test::Unit, ::Class, or ::Inline?

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
January 26, 2005 12:18
Subject:
Re: Test::Unit, ::Class, or ::Inline?
Message ID:
20050126201820.GA1299@windhund.schwern.org
On Mon, Jan 24, 2005 at 04:11:56PM -0500, Ian Langworth wrote:
> I'm taking a software development class this semester which will involve 
> writing extensive object-oriented code. My partner and I are trying to 
> decide whether to use Test::Unit, ::Class, or ::Inline for our test scripts.
> 
> I can see the advantages of Test::Class in terms of object heirarchy, 
> but I really like the idea of having my tests right along with the 
> methods when using Test::Inline. (The latter would be great when 
> presenting our code to the class.)
> 
> Thoughts?

Test::Unit, as mentioned by Curtis, has been abandoned.  Also its pretty
much a direct port of XUnit into Perl and as a result is overcomplicated
and alien.

Test::Class gives you most of the benefits of XUnit and allows you to
put the tests right next to the code you're testing as with Test::Inline.
And its being developed.  I've dropped Test::Inline on the floor.

Test::Inline's major benefit over Test::Class is you can turn your
documentation examples into tests without repeating them.

The important thing to remember is these are all additive.  Its not
either or.  You can safely use Test::Inline and Test::Class together.
You can use them all in addition to traditional .t files.  Use them all
where appropriate.



Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About