line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Test::TAP::Model::Consolidated; |
4
|
1
|
|
|
1
|
|
225008
|
use base qw/Test::TAP::Model/; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
1354
|
|
5
|
1
|
|
|
1
|
|
7
|
use List::Util (); |
|
1
|
|
|
|
|
153
|
|
|
1
|
|
|
|
|
23
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
345223
|
use Test::TAP::Model::File::Consolidated; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
401
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
2
|
|
|
2
|
1
|
88
|
my $pkg = shift; |
14
|
2
|
|
|
|
|
15
|
bless { _submodels => [ @_ ] }, $pkg; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub submodels { |
18
|
2
|
|
|
2
|
0
|
3
|
my $self = shift; |
19
|
2
|
|
|
|
|
4
|
@{$self->{_submodels}}; |
|
2
|
|
|
|
|
5
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub submodels_ref { |
23
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
24
|
0
|
|
|
|
|
0
|
[ $self->submodels ]; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub submodel_count { |
28
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
29
|
0
|
|
|
|
|
0
|
scalar $self->submodels; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub submodel_count_plus_one { |
33
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
34
|
0
|
|
|
|
|
0
|
$self->submodel_count + 1; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
2
|
|
|
2
|
1
|
21
|
sub file_class { "Test::TAP::Model::File::Consolidated" } |
38
|
|
|
|
|
|
|
sub get_test_files { |
39
|
2
|
|
|
2
|
0
|
5
|
my $self = shift; |
40
|
2
|
|
|
|
|
8
|
my @files = map { [ $_->test_files ] } $self->submodels; |
|
4
|
|
|
|
|
14
|
|
41
|
2
|
|
|
|
|
9
|
map { $self->file_class->new(@$_) } _transpose_arrays(@files); |
|
2
|
|
|
|
|
8
|
|
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _transpose_arrays { |
45
|
|
|
|
|
|
|
# FIXME skip intelligently when there are holes |
46
|
|
|
|
|
|
|
# |
47
|
|
|
|
|
|
|
# good vs. broken |
48
|
|
|
|
|
|
|
# a c d e a c d e |
49
|
|
|
|
|
|
|
# a b c e a b c e |
50
|
|
|
|
|
|
|
# |
51
|
|
|
|
|
|
|
|
52
|
2
|
50
|
|
2
|
|
8
|
my @arrays = @_ or return (); |
53
|
|
|
|
|
|
|
|
54
|
2
|
|
|
|
|
5
|
my $max = List::Util::max(map { scalar @$_ } @arrays); |
|
4
|
|
|
|
|
20
|
|
55
|
|
|
|
|
|
|
|
56
|
2
|
|
|
|
|
3
|
my @result; |
57
|
|
|
|
|
|
|
|
58
|
2
|
|
|
|
|
7
|
for (my $i = 0; $i < $max; $i++) { |
59
|
2
|
|
|
|
|
10
|
push @result, []; |
60
|
|
|
|
|
|
|
|
61
|
2
|
|
|
|
|
7
|
foreach my $arr (@arrays) { |
62
|
4
|
|
|
|
|
5
|
push @{$result[-1]}, $arr->[$i]; |
|
4
|
|
|
|
|
14
|
|
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
2
|
|
|
|
|
6
|
@result; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
__PACKAGE__; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
__END__ |