comparison Lib/IMPL/Test.pm @ 159:f8de52d3c112

IMPL::Test::Unit minor changes
author wizard
date Mon, 27 Dec 2010 01:37:44 +0300
parents e568c7c8b743
children 76515373dac0
comparison
equal deleted inserted replaced
158:a9f4ba4783eb 159:f8de52d3c112
4 4
5 require IMPL::Test::SkipException; 5 require IMPL::Test::SkipException;
6 6
7 require Exporter; 7 require Exporter;
8 our @ISA = qw(Exporter); 8 our @ISA = qw(Exporter);
9 our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip); 9 our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip &run_plan);
10 10
11 require IMPL::Test::Unit; 11 require IMPL::Test::Unit;
12 require IMPL::Test::Plan;
13 require IMPL::Test::TAPListener;
12 use IMPL::Class::Member; 14 use IMPL::Class::Member;
13 15
14 sub test($$) { 16 sub test($$) {
15 my ($name,$code) = @_; 17 my ($name,$code) = @_;
16 my $class = caller; 18 my $class = caller;
49 return 0 unless $a->[$i] eq $b->[$i]; 51 return 0 unless $a->[$i] eq $b->[$i];
50 } 52 }
51 53
52 return 1; 54 return 1;
53 } 55 }
56
57 sub run_plan {
58 my (@units) = @_;
59
60 my $plan = new IMPL::Test::Plan(@units);
61
62 $plan->Prepare;
63 $plan->AddListener(new IMPL::Test::TAPListener);
64 $plan->Run;
65 }
54 1; 66 1;