| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Test::TAP::Model::File::Consolidated; |
|
4
|
1
|
|
|
1
|
|
14
|
use base qw/Test::TAP::Model::File/; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
186
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
43
|
|
|
7
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
89
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
7
|
use List::Util (); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
247
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new { |
|
12
|
2
|
|
|
2
|
1
|
5
|
my $pkg = shift; |
|
13
|
2
|
|
|
|
|
24
|
bless { subfiles => [ @_ ]}, $pkg; |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub concat_aggr { |
|
17
|
10
|
|
|
10
|
0
|
48
|
my $self = shift; |
|
18
|
10
|
|
|
|
|
19
|
my $method = shift; |
|
19
|
|
|
|
|
|
|
|
|
20
|
10
|
50
|
|
|
|
31
|
wantarray ? (map { $_->$method } $self->subfiles) : List::Util::sum(map { scalar $_->$method } $self->subfiles); |
|
|
0
|
|
|
|
|
0
|
|
|
|
20
|
|
|
|
|
69
|
|
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub boolean_aggr { |
|
24
|
2
|
|
|
2
|
0
|
3
|
my $self = shift; |
|
25
|
2
|
|
|
|
|
7
|
my $method = shift; |
|
26
|
|
|
|
|
|
|
|
|
27
|
2
|
|
100
|
|
|
8
|
$_->$method || return for ($self->subfiles); |
|
28
|
1
|
|
|
|
|
15
|
return 1; |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
} |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
BEGIN { |
|
33
|
|
|
|
|
|
|
# these subs are aggregated |
|
34
|
|
|
|
|
|
|
# the rest are inherited, because they apply to the aggregate versions |
|
35
|
1
|
|
|
1
|
|
3
|
for my $subname (qw/ |
|
36
|
|
|
|
|
|
|
planned |
|
37
|
|
|
|
|
|
|
cases |
|
38
|
|
|
|
|
|
|
actual_cases |
|
39
|
|
|
|
|
|
|
ok_tests |
|
40
|
|
|
|
|
|
|
nok_tests |
|
41
|
|
|
|
|
|
|
todo_tests |
|
42
|
|
|
|
|
|
|
skipped_tests |
|
43
|
|
|
|
|
|
|
unexpectedly_succeeded_tests |
|
44
|
|
|
|
|
|
|
/) { |
|
45
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
121
|
|
|
46
|
8
|
|
|
10
|
|
38
|
*{$subname} = sub { $_[0]->concat_aggr($subname) }; |
|
|
8
|
|
|
|
|
37
|
|
|
|
10
|
|
|
|
|
42
|
|
|
47
|
|
|
|
|
|
|
} |
|
48
|
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
2
|
for my $subname (qw/ |
|
50
|
|
|
|
|
|
|
ok |
|
51
|
|
|
|
|
|
|
skipped |
|
52
|
|
|
|
|
|
|
bailed_out |
|
53
|
|
|
|
|
|
|
/) { |
|
54
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
71
|
|
|
55
|
3
|
|
|
2
|
|
20
|
*{$subname} = sub { $_[0]->boolean_aggr($subname) }; |
|
|
3
|
|
|
|
|
324
|
|
|
|
2
|
|
|
|
|
9
|
|
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub name { |
|
60
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; # currently broken, until _transpose_arrays is fixed |
|
61
|
0
|
|
|
|
|
0
|
$self->first_file->name; |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub subfiles { |
|
65
|
16
|
|
|
16
|
0
|
19
|
my $self = shift; |
|
66
|
16
|
|
|
|
|
16
|
@{$self->{subfiles}}; |
|
|
16
|
|
|
|
|
139
|
|
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub subfiles_ref { |
|
70
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
71
|
0
|
|
|
|
|
0
|
[ $self->subfiles ]; |
|
72
|
|
|
|
|
|
|
} |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub subfile_count { |
|
75
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
76
|
0
|
|
|
|
|
0
|
scalar $self->subfiles; |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub subfile_count_plus_one { |
|
80
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
81
|
0
|
|
|
|
|
0
|
$self->subfile_count + 1; |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub multiple_files { |
|
85
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
86
|
0
|
|
|
|
|
0
|
$self->subfile_count > 1; |
|
87
|
|
|
|
|
|
|
} |
|
88
|
|
|
|
|
|
|
sub first_file { |
|
89
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
90
|
0
|
|
|
|
|
0
|
($self->subfiles)[0]; |
|
91
|
|
|
|
|
|
|
} |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub consistent { |
|
94
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
|
95
|
|
|
|
|
|
|
|
|
96
|
2
|
|
|
|
|
7
|
my ($head, @tail) = $self->subfiles; |
|
97
|
|
|
|
|
|
|
|
|
98
|
2
|
|
|
|
|
5
|
foreach my $tail (@tail) { |
|
99
|
2
|
100
|
|
|
|
11
|
return undef unless $head == $tail; |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
1
|
|
|
|
|
5
|
1; |
|
103
|
|
|
|
|
|
|
} |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
__PACKAGE__; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__END__ |