line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Subtest; |
2
|
32
|
|
|
32
|
|
491
|
use strict; |
|
32
|
|
|
|
|
46
|
|
|
32
|
|
|
|
|
690
|
|
3
|
32
|
|
|
32
|
|
92
|
use warnings; |
|
32
|
|
|
|
|
36
|
|
|
32
|
|
|
|
|
606
|
|
4
|
|
|
|
|
|
|
|
5
|
32
|
|
|
32
|
|
92
|
use Scalar::Util qw/blessed/; |
|
32
|
|
|
|
|
32
|
|
|
32
|
|
|
|
|
1136
|
|
6
|
32
|
|
|
32
|
|
97
|
use Carp qw/confess/; |
|
32
|
|
|
|
|
42
|
|
|
32
|
|
|
|
|
1194
|
|
7
|
|
|
|
|
|
|
|
8
|
32
|
|
|
32
|
|
110
|
use Test::Stream::Formatter::TAP qw/OUT_STD/; |
|
32
|
|
|
|
|
38
|
|
|
32
|
|
|
|
|
186
|
|
9
|
|
|
|
|
|
|
|
10
|
32
|
|
|
32
|
|
119
|
use base 'Test::Stream::Event::Ok'; |
|
32
|
|
|
|
|
46
|
|
|
32
|
|
|
|
|
2848
|
|
11
|
32
|
|
|
32
|
|
133
|
use Test::Stream::HashBase accessors => [qw/subevents buffered/]; |
|
32
|
|
|
|
|
35
|
|
|
32
|
|
|
|
|
222
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub init { |
14
|
222
|
|
|
222
|
0
|
225
|
my $self = shift; |
15
|
222
|
|
|
|
|
593
|
$self->SUPER::init(); |
16
|
222
|
|
100
|
|
|
548
|
$self->{+SUBEVENTS} ||= []; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub to_tap { |
20
|
194
|
|
|
194
|
1
|
233
|
my $self = shift; |
21
|
194
|
|
|
|
|
189
|
my ($num) = @_; |
22
|
|
|
|
|
|
|
|
23
|
194
|
|
|
|
|
447
|
my ($ok, @diag) = $self->SUPER::to_tap($num); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
return ( |
26
|
|
|
|
|
|
|
$ok, |
27
|
|
|
|
|
|
|
@diag |
28
|
194
|
100
|
|
|
|
368
|
) unless $self->{+BUFFERED}; |
29
|
|
|
|
|
|
|
|
30
|
189
|
100
|
|
|
|
407
|
if ($ENV{HARNESS_IS_VERBOSE}) { |
31
|
1
|
|
|
|
|
7
|
$_->[1] =~ s/^/ /mg for @diag; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
189
|
|
|
|
|
550
|
$ok->[1] =~ s/\n/ {\n/; |
35
|
|
|
|
|
|
|
|
36
|
189
|
|
|
|
|
201
|
my $count = 0; |
37
|
|
|
|
|
|
|
my @subs = map { |
38
|
1492
|
100
|
|
|
|
3511
|
$count++ if $_->isa('Test::Stream::Event::Ok'); |
39
|
1492
|
|
|
|
|
2237
|
map { $_->[1] =~ s/^/ /mg; $_ } $_->to_tap($count); |
|
1911
|
|
|
|
|
3839
|
|
|
1911
|
|
|
|
|
2420
|
|
40
|
189
|
|
|
|
|
185
|
} @{$self->{+SUBEVENTS}}; |
|
189
|
|
|
|
|
347
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
return ( |
43
|
189
|
|
|
|
|
749
|
$ok, |
44
|
|
|
|
|
|
|
@diag, |
45
|
|
|
|
|
|
|
@subs, |
46
|
|
|
|
|
|
|
[OUT_STD(), "}\n"], |
47
|
|
|
|
|
|
|
); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__END__ |