develooper Front page | perl.qa | Postings from October 2011

Fw: Do we need subtests in TAP?

Thread Next
From:
Ovid
Date:
October 29, 2011 08:34
Subject:
Fw: Do we need subtests in TAP?
Message ID:
1319902454.90722.YahooMailNeo@web65713.mail.ac4.yahoo.com
Should have been sent to the list, not just Fergal.
 
Cheers,
Ovid
--
Live and work overseas - http://overseas-exile.blogspot.com/
Buy the book           - http://www.oreilly.com/catalog/perlhks/
Tech blog              - http://blogs.perl.org/users/ovid/
Twitter                - http://twitter.com/OvidPerl/


----- Forwarded Message -----
> From: Ovid <curtis_ovid_poe@yahoo.com>
> To: Fergal Daly <fergal@esatclear.ie>
> Cc: 
> Sent: Saturday, 29 October 2011, 17:33
> Subject: Re: Do we need subtests in TAP?
> 
>> ________________________________
>> From: Fergal Daly <fergal@esatclear.ie>
> 
> 
>> It seems like it's impossible then to declare a global plan in advance
>> if you use subtests unless you go counting all the sub tests which is
>> no fun,
> 
> 
> Oops. It think it may not have been explained well. There is no distinction at 
> the top level between a subtest and an individual test:
> 
>     is $foo, $bar, $description;
>     subtest 'some test', sub { ... };
> 
> That's two tests. It doesn't matter how many "tests" the 
> subtest runs  (even if it contains further subtests): it's one test.
> 
> That makes it *easier* to maintain plans with subtests. When Abigail was testing 
> regexes, Abigail had a problem knowing in advance how many tests a given feature 
> would require for various versions of Perl. Just dropping each feature into a 
> subtest made it trivial. Each subtest would exercise a varying number of tests 
> per feature (in other words, subtests bridge the gap between xUnit testing and 
> TAP).
> 
> Cheers,
> Ovid
> --
> Live and work overseas - http://overseas-exile.blogspot.com/
> Buy the book           - http://www.oreilly.com/catalog/perlhks/
> Tech blog              - http://blogs.perl.org/users/ovid/
> Twitter                - http://twitter.com/OvidPerl/
>

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