Mercurial > pub > Impl
changeset 84:e568c7c8b743
Minor changes to the test infrastructure
author | wizard |
---|---|
date | Wed, 14 Apr 2010 17:38:11 +0400 |
parents | 74bae30eb25e |
children | 190c794a41ae |
files | Lib/IMPL/Test.pm Lib/IMPL/Test/TAPListener.pm |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/IMPL/Test.pm Tue Apr 13 20:27:56 2010 +0400 +++ b/Lib/IMPL/Test.pm Wed Apr 14 17:38:11 2010 +0400 @@ -2,9 +2,11 @@ use strict; use warnings; +require IMPL::Test::SkipException; + require Exporter; our @ISA = qw(Exporter); -our @EXPORT_OK = qw(&test &shared &failed &cmparray); +our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip); require IMPL::Test::Unit; use IMPL::Class::Member; @@ -34,6 +36,10 @@ die new IMPL::Test::FailException(@_); } +sub skip($;@) { + die new IMPL::Test::SkipException(@_); +} + sub cmparray { my ($a,$b) = @_;
--- a/Lib/IMPL/Test/TAPListener.pm Tue Apr 13 20:27:56 2010 +0400 +++ b/Lib/IMPL/Test/TAPListener.pm Wed Apr 14 17:38:11 2010 +0400 @@ -58,7 +58,7 @@ $result->State == IMPL::Test::Result::SUCCESS ? "ok $n " . join("\n# ", split(/\n/, $result->Name) ) : - "not ok $n " . (eval { $result->Exception->isa('IMPL::Test::SkipException') } ? '# SKIP ' : '') . join("\n# ", split(/\n/, $result->Name."\n".$result->Exception || '') ) + "not ok $n " . (eval { $result->Exception->isa('IMPL::Test::SkipException') } ? '#SKIP: ' : '') . join("\n# ", split(/\n/, $result->Name.": ".$result->Exception || '') ) ),"\n"; }