----- Original Message ----
From: Luke Closs <[EMAIL PROTECTED]>

> Maybe slightly unrelated, but have you guys considered adding some  
> extra (optional) meta info to the TAP spec?  For instance at $work,  
> we group our individual assertions into higher level tests like this:
>
> # TITLE: Some test case
>  ok 1
>  ok 2 - awesome
>  not ok 3

If you find yourself doing that a lot, I strongly recommend checking out 
Test::Class.  Then, grouping tests is as simple as including them in a single 
method:

  sub some_test_case : Test(3) {
      my $test = shift; # same as $self, actually
      ok some_func();
      ok another_func(), 'awesome';
      is $answer, 42;
  }

It's also easier to organize tests and you can inherit tests, too (that's very 
useful when you're changing only a small bit of behavior in a subclass but you 
need to ensure that the rest of the behavior is unchanged).

Cheers,
Ovid




Reply via email to