line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Catch; |
2
|
2
|
|
|
2
|
|
168495
|
use 5.012; |
|
2
|
|
|
|
|
16
|
|
3
|
2
|
|
|
2
|
|
9
|
use Test::More(); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
21
|
|
4
|
2
|
|
|
2
|
|
797
|
use XS::libcatch(); |
|
2
|
|
|
|
|
13910
|
|
|
2
|
|
|
|
|
57
|
|
5
|
2
|
|
|
2
|
|
12
|
use Test::Builder(); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
135
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '2.0.0'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
XS::Loader::load(); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub import { |
12
|
3
|
|
|
3
|
|
2497
|
shift; |
13
|
3
|
100
|
|
|
|
10
|
if (@_) { |
14
|
1
|
|
|
|
|
4
|
run(@_); |
15
|
1
|
|
|
|
|
11
|
Test::More::done_testing(); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
3
|
|
|
|
|
11
|
my $pkg = caller(); |
19
|
2
|
|
|
2
|
|
9
|
no strict 'refs'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
305
|
|
20
|
3
|
|
|
|
|
5
|
*{"${pkg}::catch_run"} = \&run; |
|
3
|
|
|
|
|
111
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub run { |
24
|
5
|
|
|
5
|
1
|
10234
|
my @args = @_; |
25
|
5
|
|
|
|
|
11
|
my $ctx = Test::Builder->new->ctx; |
26
|
5
|
|
|
|
|
376
|
my $hub = $ctx->hub; |
27
|
5
|
|
|
|
|
20
|
my $count = $hub->count; |
28
|
5
|
|
|
|
|
18
|
my $failed = $hub->failed; |
29
|
5
|
|
|
|
|
17
|
my $depth = $hub->nested; |
30
|
5
|
|
|
|
|
2498
|
my $ret = _run($count, $failed, $depth, @args); |
31
|
5
|
|
|
|
|
32
|
$hub->set_count($count); |
32
|
5
|
|
|
|
|
26
|
$hub->set_failed($failed); |
33
|
5
|
|
|
|
|
20
|
$ctx->release; |
34
|
5
|
|
|
|
|
122
|
return $ret; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |