line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Test::TAP::Model::File::Visual; |
4
|
8
|
|
|
8
|
|
53698
|
use base qw/Test::TAP::Model::File/; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
5552
|
|
5
|
|
|
|
|
|
|
|
6
|
8
|
|
|
8
|
|
17322
|
use strict; |
|
8
|
|
|
|
|
24
|
|
|
8
|
|
|
|
|
324
|
|
7
|
8
|
|
|
8
|
|
58
|
use warnings; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
291
|
|
8
|
|
|
|
|
|
|
|
9
|
8
|
|
|
8
|
|
1487
|
use Test::TAP::Model::Colorful; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
165
|
|
10
|
8
|
|
|
8
|
|
5492
|
use Test::TAP::Model::Subtest::Visual; |
|
8
|
|
|
|
|
25
|
|
|
8
|
|
|
|
|
312
|
|
11
|
8
|
|
|
8
|
|
71
|
use URI::file; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
3080
|
|
12
|
|
|
|
|
|
|
|
13
|
27
|
|
|
27
|
1
|
4042
|
sub subtest_class { "Test::TAP::Model::Subtest::Visual" } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub desc_string { |
16
|
3
|
|
|
3
|
1
|
8
|
my $self = shift; |
17
|
3
|
50
|
|
|
|
449
|
$self->{_desc_string} = shift if @_; |
18
|
3
|
|
50
|
|
|
33
|
$self->{_desc_string} ||= ""; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub cases { |
22
|
65
|
|
|
65
|
1
|
6042
|
my $self = shift; |
23
|
65
|
100
|
|
|
|
301
|
return $self->SUPER::cases(@_) unless wantarray; |
24
|
|
|
|
|
|
|
|
25
|
5
|
|
|
|
|
36
|
my @ret = $self->SUPER::cases(@_); |
26
|
5
|
50
|
|
|
|
108
|
return @ret if @ret; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# if there are no tests, return a stub that represents the whole file |
29
|
0
|
|
|
|
|
0
|
return $self->subtest_class->new({ |
30
|
|
|
|
|
|
|
type => "test", |
31
|
|
|
|
|
|
|
ok => $self->ok, |
32
|
|
|
|
|
|
|
skip => $self->skipped, |
33
|
|
|
|
|
|
|
line => "stub" |
34
|
|
|
|
|
|
|
}); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub str_status { |
38
|
12
|
|
|
12
|
1
|
31366
|
my $self = shift; |
39
|
12
|
100
|
|
|
|
121
|
return "SKIPPED" if $self->skipped; |
40
|
10
|
100
|
|
|
|
362
|
return "BAILED OUT" if $self->bailed_out; |
41
|
|
|
|
|
|
|
|
42
|
5
|
100
|
100
|
|
|
82
|
return "OK" |
|
|
|
66
|
|
|
|
|
43
|
|
|
|
|
|
|
if $self->ok |
44
|
|
|
|
|
|
|
and $self->actual_cases == $self->planned |
45
|
|
|
|
|
|
|
and $self->actual_cases > 0; |
46
|
|
|
|
|
|
|
|
47
|
3
|
|
|
|
|
62
|
return "FAILED"; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
11
|
|
|
11
|
1
|
10893
|
sub link { URI::file->new($_[0]->name) } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub case_rows { |
53
|
5
|
|
|
5
|
1
|
788
|
my $self = shift; |
54
|
5
|
|
|
|
|
107
|
my @cases = $self->cases; |
55
|
5
|
|
|
|
|
12
|
my @ret; |
56
|
|
|
|
|
|
|
|
57
|
5
|
|
100
|
|
|
85
|
my $rows = int(.9 + @cases / 50) || 1; |
58
|
5
|
|
|
|
|
64
|
my $per_row = int(.9 + @cases / $rows); |
59
|
|
|
|
|
|
|
|
60
|
5
|
|
|
|
|
52
|
push @ret, { cases => [ splice(@cases, 0, $per_row) ] } while @cases; |
61
|
|
|
|
|
|
|
|
62
|
5
|
|
|
|
|
23
|
\@ret; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__PACKAGE__ |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |