changeset 159:f8de52d3c112

IMPL::Test::Unit minor changes
author wizard
date Mon, 27 Dec 2010 01:37:44 +0300
parents a9f4ba4783eb
children 3f09584bf189
files Lib/IMPL/Test.pm Lib/IMPL/Test/Unit.pm
diffstat 2 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/IMPL/Test.pm	Tue Nov 02 20:17:22 2010 +0300
+++ b/Lib/IMPL/Test.pm	Mon Dec 27 01:37:44 2010 +0300
@@ -6,9 +6,11 @@
 
 require Exporter;
 our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip);
+our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip &run_plan);
 
 require IMPL::Test::Unit;
+require IMPL::Test::Plan;
+require IMPL::Test::TAPListener;
 use IMPL::Class::Member;
 
 sub test($$) {
@@ -51,4 +53,14 @@
     
     return 1;
 }
+
+sub run_plan {
+	my (@units) = @_;
+	
+	my $plan = new IMPL::Test::Plan(@units);
+	
+	$plan->Prepare;
+	$plan->AddListener(new IMPL::Test::TAPListener);
+	$plan->Run;
+}
 1;
--- a/Lib/IMPL/Test/Unit.pm	Tue Nov 02 20:17:22 2010 +0300
+++ b/Lib/IMPL/Test/Unit.pm	Mon Dec 27 01:37:44 2010 +0300
@@ -32,10 +32,6 @@
     $self->toString;
 }
 
-sub Setup {
-    1;
-}
-
 sub Cleanup {
     my ($this,$session) = @_;
     
@@ -74,7 +70,6 @@
     my $t = [gettimeofday];
     return try {
         $this->InitTest($session);
-        $this->Setup;
         my $code = $this->Code;