line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Catch; |
2
|
1
|
|
|
1
|
|
138018
|
use 5.012; |
|
1
|
|
|
|
|
3
|
|
3
|
1
|
|
|
1
|
|
1237
|
use XS::Loader; |
|
1
|
|
|
|
|
4155
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
6
|
use Test::More(); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
5
|
1
|
|
|
1
|
|
5
|
use Test::Builder(); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
67
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.0.16'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
XS::Loader::load(); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
2
|
|
|
2
|
|
3037
|
shift; |
13
|
2
|
100
|
|
|
|
9
|
if (@_) { |
14
|
1
|
|
|
|
|
3
|
run(@_); |
15
|
1
|
|
|
|
|
11
|
Test::More::done_testing(); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
8
|
my $pkg = caller(); |
19
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
182
|
|
20
|
2
|
|
|
|
|
5
|
*{"${pkg}::catch_run"} = \&run; |
|
2
|
|
|
|
|
136
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub run { |
24
|
5
|
|
|
5
|
1
|
12215
|
my @args = @_; |
25
|
5
|
|
|
|
|
15
|
my $ctx = Test::Builder->new->ctx; |
26
|
5
|
|
|
|
|
434
|
my $hub = $ctx->hub; |
27
|
5
|
|
|
|
|
35
|
my $count = $hub->count; |
28
|
5
|
|
|
|
|
28
|
my $failed = $hub->failed; |
29
|
5
|
|
|
|
|
20
|
my $depth = $hub->nested; |
30
|
5
|
|
|
|
|
6039
|
my $ret = _run($count, $failed, $depth, @args); |
31
|
5
|
|
|
|
|
43
|
$hub->set_count($count); |
32
|
5
|
|
|
|
|
34
|
$hub->set_failed($failed); |
33
|
5
|
|
|
|
|
27
|
$ctx->release; |
34
|
5
|
|
|
|
|
148
|
return $ret; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |