line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Catch; |
2
|
1
|
|
|
1
|
|
388968
|
use 5.012; |
|
1
|
|
|
|
|
4
|
|
3
|
1
|
|
|
1
|
|
515
|
use XS::Loader; |
|
1
|
|
|
|
|
4030
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
8
|
use Test::More(); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
5
|
1
|
|
|
1
|
|
5
|
use Test::Builder(); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '1.0.15'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
XS::Loader::load(); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
2
|
|
|
2
|
|
2952
|
shift; |
13
|
2
|
100
|
|
|
|
8
|
if (@_) { |
14
|
1
|
|
|
|
|
4
|
run(@_); |
15
|
1
|
|
|
|
|
12
|
Test::More::done_testing(); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
|
|
9
|
my $pkg = caller(); |
19
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
171
|
|
20
|
2
|
|
|
|
|
4
|
*{"${pkg}::catch_run"} = \&run; |
|
2
|
|
|
|
|
107
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub run { |
24
|
5
|
|
|
5
|
1
|
12014
|
my @args = @_; |
25
|
5
|
|
|
|
|
16
|
my $ctx = Test::Builder->new->ctx; |
26
|
5
|
|
|
|
|
435
|
my $hub = $ctx->hub; |
27
|
5
|
|
|
|
|
26
|
my $count = $hub->count; |
28
|
5
|
|
|
|
|
34
|
my $failed = $hub->failed; |
29
|
5
|
|
|
|
|
19
|
my $depth = $hub->nested; |
30
|
5
|
|
|
|
|
6151
|
my $ret = _run($count, $failed, $depth, @args); |
31
|
5
|
|
|
|
|
42
|
$hub->set_count($count); |
32
|
5
|
|
|
|
|
34
|
$hub->set_failed($failed); |
33
|
5
|
|
|
|
|
25
|
$ctx->release; |
34
|
5
|
|
|
|
|
152
|
return $ret; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |