Mercurial > pub > Impl
diff Lib/IMPL/Test/HarnessRunner.pm @ 0:03e58a454b20
Создан репозитарий
author | Sergey |
---|---|
date | Tue, 14 Jul 2009 12:54:37 +0400 |
parents | |
children | 16ada169ca75 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/IMPL/Test/HarnessRunner.pm Tue Jul 14 12:54:37 2009 +0400 @@ -0,0 +1,37 @@ +package IMPL::Test::HarnessRunner; +use strict; +use warnings; + +use base qw(IMPL::Object IMPL::Object::Autofill IMPL::Object::Serializable); +use IMPL::Class::Property; +use Test::Harness; + +__PACKAGE__->PassThroughArgs; + +BEGIN { + public property Strap => prop_all; +} + +sub CTOR { + my $this = shift; + + die new IMPL::InvalidArgumentException("The Strap parameter must be specified") unless $this->Strap; +} + +sub RunTests { + my ($this,@files) = @_; + + local $Test::Harness::Strap = $this->Strap; + + return runtests(@files); +} + +sub ExecuteTests { + my ($this,%args) = @_; + + local $Test::Harness::Strap = $this->Strap; + + return Test::Harness::execute_tests(%args); +} + +1;