line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Subtest; |
2
|
57
|
|
|
57
|
|
466
|
use strict; |
|
57
|
|
|
|
|
59
|
|
|
57
|
|
|
|
|
1254
|
|
3
|
57
|
|
|
57
|
|
160
|
use warnings; |
|
57
|
|
|
|
|
55
|
|
|
57
|
|
|
|
|
2180
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000043'; |
6
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) |
7
|
|
|
|
|
|
|
|
8
|
57
|
|
|
57
|
|
202
|
use base 'Test2::Event::Ok'; |
|
57
|
|
|
|
|
52
|
|
|
57
|
|
|
|
|
3456
|
|
9
|
57
|
|
|
57
|
|
200
|
use Test2::Util::HashBase qw{subevents buffered subtest_id}; |
|
57
|
|
|
|
|
61
|
|
|
57
|
|
|
|
|
272
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
43
|
|
|
43
|
0
|
48
|
my $self = shift; |
13
|
43
|
|
|
|
|
128
|
$self->SUPER::init(); |
14
|
43
|
|
100
|
|
|
114
|
$self->{+SUBEVENTS} ||= []; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub summary { |
18
|
4
|
|
|
4
|
1
|
5
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
100
|
|
|
11
|
my $name = $self->{+NAME} || "Nameless Subtest"; |
21
|
|
|
|
|
|
|
|
22
|
4
|
|
|
|
|
5
|
my $todo = $self->{+TODO}; |
23
|
4
|
100
|
|
|
|
8
|
if ($todo) { |
|
|
100
|
|
|
|
|
|
24
|
1
|
|
|
|
|
4
|
$name .= " (TODO: $todo)"; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
elsif (defined $todo) { |
27
|
1
|
|
|
|
|
3
|
$name .= " (TODO)" |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
4
|
|
|
|
|
12
|
return $name; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |