line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Ika::Reporter::TAP; |
2
|
14
|
|
|
14
|
|
9066
|
use strict; |
|
14
|
|
|
|
|
23
|
|
|
14
|
|
|
|
|
415
|
|
3
|
14
|
|
|
14
|
|
65
|
use warnings; |
|
14
|
|
|
|
|
21
|
|
|
14
|
|
|
|
|
394
|
|
4
|
14
|
|
|
14
|
|
302
|
use utf8; |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
90
|
|
5
|
14
|
|
|
14
|
|
1220
|
use parent qw/Test::Builder::Module/; |
|
14
|
|
|
|
|
311
|
|
|
14
|
|
|
|
|
97
|
|
6
|
14
|
|
|
14
|
|
11765
|
use Scope::Guard (); |
|
14
|
|
|
|
|
5509
|
|
|
14
|
|
|
|
|
6658
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
13
|
|
|
13
|
0
|
29
|
my $class = shift; |
10
|
13
|
|
|
|
|
86
|
return bless {describe => []}, $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub describe { |
14
|
0
|
|
|
0
|
0
|
0
|
my ($self, $name) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
0
|
push @{$self->{describe}}, $name; |
|
0
|
|
|
|
|
0
|
|
17
|
|
|
|
|
|
|
return Scope::Guard->new(sub { |
18
|
0
|
|
|
0
|
|
0
|
pop @{$self->{describe}}; |
|
0
|
|
|
|
|
0
|
|
19
|
0
|
|
|
|
|
0
|
}); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub exception { |
23
|
0
|
|
|
0
|
0
|
0
|
my ($self, $name) = @_; |
24
|
0
|
|
|
|
|
0
|
$name =~ s/\n\Z//; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
0
|
local $Test::Builder::Level = $Test::Builder::Level + 1; |
27
|
0
|
|
|
|
|
0
|
my $builder = __PACKAGE__->builder; |
28
|
0
|
|
|
|
|
0
|
$builder->ok(0, "Error: $name"); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub it { |
32
|
0
|
|
|
0
|
0
|
0
|
my ($self, $name, $test, $output, $error) = @_; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
0
|
local $Test::Builder::Level = $Test::Builder::Level + 9; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
0
|
my $builder = __PACKAGE__->builder; |
37
|
|
|
|
|
|
|
{ |
38
|
0
|
|
|
|
|
0
|
$builder->ok($test, '(' . join("/", @{$self->{describe}}) . ') ' . $name); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
0
|
if ($output) { |
42
|
0
|
0
|
|
|
|
0
|
if ($test) { |
43
|
0
|
|
|
|
|
0
|
$builder->note($output); |
44
|
|
|
|
|
|
|
} else { |
45
|
0
|
|
|
|
|
0
|
$builder->diag($output); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
0
|
0
|
|
|
|
0
|
if ($error) { |
50
|
0
|
|
|
|
|
0
|
$builder->diag("Error: $error"); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub finalize { |
55
|
1
|
|
|
1
|
0
|
1
|
my $self = shift; |
56
|
1
|
50
|
|
|
|
15
|
if ($self->{finalized}++) { |
57
|
0
|
|
|
|
|
0
|
Carp::croak("Do not finalize twice."); |
58
|
|
|
|
|
|
|
} else { |
59
|
1
|
|
|
|
|
13
|
my $builder = __PACKAGE__->builder; |
60
|
1
|
|
|
|
|
15
|
$builder->done_testing; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
__END__ |