line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Subtest; |
2
|
32
|
|
|
32
|
|
702
|
use strict; |
|
32
|
|
|
|
|
65
|
|
|
32
|
|
|
|
|
822
|
|
3
|
32
|
|
|
32
|
|
201
|
use warnings; |
|
32
|
|
|
|
|
66
|
|
|
32
|
|
|
|
|
827
|
|
4
|
|
|
|
|
|
|
|
5
|
32
|
|
|
32
|
|
159
|
use Scalar::Util qw/blessed/; |
|
32
|
|
|
|
|
55
|
|
|
32
|
|
|
|
|
1520
|
|
6
|
32
|
|
|
32
|
|
155
|
use Carp qw/confess/; |
|
32
|
|
|
|
|
64
|
|
|
32
|
|
|
|
|
1487
|
|
7
|
|
|
|
|
|
|
|
8
|
32
|
|
|
32
|
|
363
|
use Test::Stream::Formatter::TAP qw/OUT_STD/; |
|
32
|
|
|
|
|
65
|
|
|
32
|
|
|
|
|
289
|
|
9
|
|
|
|
|
|
|
|
10
|
32
|
|
|
32
|
|
174
|
use Test::Stream::Event::Ok; |
|
32
|
|
|
|
|
63
|
|
|
32
|
|
|
|
|
485
|
|
11
|
|
|
|
|
|
|
use Test::Stream::Event( |
12
|
32
|
|
|
|
|
197
|
base => 'Test::Stream::Event::Ok', |
13
|
|
|
|
|
|
|
accessors => [qw/subevents buffered/], |
14
|
32
|
|
|
32
|
|
179
|
); |
|
32
|
|
|
|
|
71
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub init { |
17
|
221
|
|
|
221
|
0
|
381
|
my $self = shift; |
18
|
221
|
|
|
|
|
844
|
$self->SUPER::init(); |
19
|
221
|
|
100
|
|
|
920
|
$self->{+SUBEVENTS} ||= []; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub to_tap { |
23
|
193
|
|
|
193
|
1
|
371
|
my $self = shift; |
24
|
193
|
|
|
|
|
323
|
my ($num) = @_; |
25
|
|
|
|
|
|
|
|
26
|
193
|
|
|
|
|
747
|
my ($ok, @diag) = $self->SUPER::to_tap($num); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return ( |
29
|
|
|
|
|
|
|
$ok, |
30
|
|
|
|
|
|
|
@diag |
31
|
193
|
100
|
|
|
|
590
|
) unless $self->{+BUFFERED}; |
32
|
|
|
|
|
|
|
|
33
|
188
|
100
|
|
|
|
540
|
if ($ENV{HARNESS_IS_VERBOSE}) { |
34
|
1
|
|
|
|
|
8
|
$_->[1] =~ s/^/ /mg for @diag; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
188
|
|
|
|
|
771
|
$ok->[1] =~ s/\n/ {\n/; |
38
|
|
|
|
|
|
|
|
39
|
188
|
|
|
|
|
341
|
my $count = 0; |
40
|
|
|
|
|
|
|
my @subs = map { |
41
|
1482
|
100
|
|
|
|
5685
|
$count++ if $_->isa('Test::Stream::Event::Ok'); |
42
|
1482
|
|
|
|
|
4186
|
map { $_->[1] =~ s/^/ /mg; $_ } $_->to_tap($count); |
|
1901
|
|
|
|
|
6884
|
|
|
1901
|
|
|
|
|
4641
|
|
43
|
188
|
|
|
|
|
264
|
} @{$self->{+SUBEVENTS}}; |
|
188
|
|
|
|
|
495
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
return ( |
46
|
188
|
|
|
|
|
1161
|
$ok, |
47
|
|
|
|
|
|
|
@diag, |
48
|
|
|
|
|
|
|
@subs, |
49
|
|
|
|
|
|
|
[OUT_STD(), "}\n"], |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |