Hi all,

For the TAPx::Parser, I need a better way of tracking all tests which 
unexpectedly succeed.  The simple way is to have the user accumulate them while 
the tests are running:

  while ( my $result = $parser->results ) {
    if ( $result->is_test && $result->has_todo && $result->actual_passed ) {
      # test unexpectedly succeeded
    }
  }

That's ugly.  Really ugly.  However, it reads clearly (once you know the 
methods).  It seems better if I can have individual tests report this status:

  if ( $result->unexpectedly_succeeded ) { ... }

And for the parser to also track this:

  if ( $parser->unexpectedly_succeeded ) { ... }

But "unexpectedly_succeeded", while descriptive, is a terrible method name.  
For the life of me, I can't think of a better one which is also equally 
descriptive.  Heck, all I've come up with is $result->is_fluke, and that ain't 
gonna cut it.

Help?

Cheers,
Ovid
 
-- If this message is a response to a question on a mailing list, please send 
follow up questions to the list.
 
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/



Reply via email to