line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Subtest; |
2
|
32
|
|
|
32
|
|
809
|
use strict; |
|
32
|
|
|
|
|
58
|
|
|
32
|
|
|
|
|
821
|
|
3
|
32
|
|
|
32
|
|
157
|
use warnings; |
|
32
|
|
|
|
|
62
|
|
|
32
|
|
|
|
|
877
|
|
4
|
|
|
|
|
|
|
|
5
|
32
|
|
|
32
|
|
154
|
use Scalar::Util qw/blessed/; |
|
32
|
|
|
|
|
57
|
|
|
32
|
|
|
|
|
1530
|
|
6
|
32
|
|
|
32
|
|
220
|
use Carp qw/confess/; |
|
32
|
|
|
|
|
68
|
|
|
32
|
|
|
|
|
1423
|
|
7
|
|
|
|
|
|
|
|
8
|
32
|
|
|
32
|
|
301
|
use Test::Stream::Formatter::TAP qw/OUT_STD/; |
|
32
|
|
|
|
|
60
|
|
|
32
|
|
|
|
|
290
|
|
9
|
|
|
|
|
|
|
|
10
|
32
|
|
|
32
|
|
179
|
use Test::Stream::Event::Ok; |
|
32
|
|
|
|
|
70
|
|
|
32
|
|
|
|
|
456
|
|
11
|
|
|
|
|
|
|
use Test::Stream::Event( |
12
|
32
|
|
|
|
|
189
|
base => 'Test::Stream::Event::Ok', |
13
|
|
|
|
|
|
|
accessors => [qw/subevents buffered/], |
14
|
32
|
|
|
32
|
|
178
|
); |
|
32
|
|
|
|
|
82
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub init { |
17
|
221
|
|
|
221
|
0
|
418
|
my $self = shift; |
18
|
221
|
|
|
|
|
830
|
$self->SUPER::init(); |
19
|
221
|
|
100
|
|
|
848
|
$self->{+SUBEVENTS} ||= []; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub to_tap { |
23
|
193
|
|
|
193
|
1
|
371
|
my $self = shift; |
24
|
193
|
|
|
|
|
309
|
my ($num) = @_; |
25
|
|
|
|
|
|
|
|
26
|
193
|
|
|
|
|
719
|
my ($ok, @diag) = $self->SUPER::to_tap($num); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return ( |
29
|
|
|
|
|
|
|
$ok, |
30
|
|
|
|
|
|
|
@diag |
31
|
193
|
100
|
|
|
|
567
|
) unless $self->{+BUFFERED}; |
32
|
|
|
|
|
|
|
|
33
|
188
|
100
|
|
|
|
517
|
if ($ENV{HARNESS_IS_VERBOSE}) { |
34
|
1
|
|
|
|
|
7
|
$_->[1] =~ s/^/ /mg for @diag; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
188
|
|
|
|
|
733
|
$ok->[1] =~ s/\n/ {\n/; |
38
|
|
|
|
|
|
|
|
39
|
188
|
|
|
|
|
334
|
my $count = 0; |
40
|
|
|
|
|
|
|
my @subs = map { |
41
|
1482
|
100
|
|
|
|
5688
|
$count++ if $_->isa('Test::Stream::Event::Ok'); |
42
|
1482
|
|
|
|
|
4089
|
map { $_->[1] =~ s/^/ /mg; $_ } $_->to_tap($count); |
|
1901
|
|
|
|
|
6736
|
|
|
1901
|
|
|
|
|
4416
|
|
43
|
188
|
|
|
|
|
299
|
} @{$self->{+SUBEVENTS}}; |
|
188
|
|
|
|
|
456
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
return ( |
46
|
188
|
|
|
|
|
1105
|
$ok, |
47
|
|
|
|
|
|
|
@diag, |
48
|
|
|
|
|
|
|
@subs, |
49
|
|
|
|
|
|
|
[OUT_STD(), "}\n"], |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
1; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
__END__ |