Mercurial > pub > Impl
comparison Lib/IMPL/Test/HarnessRunner.pm @ 180:d1676be8afcc
Перекодировка в utf-8
author | sourcer |
---|---|
date | Fri, 30 Dec 2011 23:40:00 +0300 |
parents | 4267a2ac3d46 |
children | 5c82eec23bb6 |
comparison
equal
deleted
inserted
replaced
179:b3d91ff7aea9 | 180:d1676be8afcc |
---|---|
1 package IMPL::Test::HarnessRunner; | 1 package IMPL::Test::HarnessRunner; |
2 use strict; | 2 use strict; |
3 use warnings; | 3 use warnings; |
4 | 4 |
5 use parent qw(IMPL::Object IMPL::Object::Autofill IMPL::Object::Serializable); | 5 use parent qw(IMPL::Object IMPL::Object::Autofill IMPL::Object::Serializable); |
6 use IMPL::Class::Property; | 6 use IMPL::lang qw(:declare :constants); |
7 use TAP::Parser; | |
7 use Test::Harness; | 8 use Test::Harness; |
8 | 9 |
9 __PACKAGE__->PassThroughArgs; | 10 __PACKAGE__->PassThroughArgs; |
10 | 11 |
11 BEGIN { | 12 BEGIN { |
12 public property Strap => prop_all; | |
13 } | 13 } |
14 | 14 |
15 sub CTOR { | 15 sub CTOR { |
16 my $this = shift; | 16 my $this = shift; |
17 | |
18 die new IMPL::InvalidArgumentException("The Strap parameter must be specified") unless $this->Strap; | |
19 } | 17 } |
20 | 18 |
21 sub RunTests { | 19 sub RunTests { |
22 my ($this,@files) = @_; | 20 my ($this,@files) = @_; |
23 | |
24 local $Test::Harness::Strap = $this->Strap; | |
25 | 21 |
26 return runtests(@files); | 22 return runtests(@files); |
27 } | 23 } |
28 | 24 |
29 sub ExecuteTests { | 25 sub ExecuteTests { |
30 my ($this,%args) = @_; | 26 my ($this,%args) = @_; |
31 | 27 |
32 local $Test::Harness::Strap = $this->Strap; | |
33 | |
34 return Test::Harness::execute_tests(%args); | 28 return Test::Harness::execute_tests(%args); |
35 } | 29 } |
36 | 30 |
37 1; | 31 1; |