line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Subtest; |
2
|
57
|
|
|
57
|
|
505
|
use strict; |
|
57
|
|
|
|
|
93
|
|
|
57
|
|
|
|
|
1220
|
|
3
|
57
|
|
|
57
|
|
168
|
use warnings; |
|
57
|
|
|
|
|
48
|
|
|
57
|
|
|
|
|
1716
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000044'; |
6
|
|
|
|
|
|
|
|
7
|
57
|
|
|
57
|
|
177
|
use base 'Test2::Event::Ok'; |
|
57
|
|
|
|
|
49
|
|
|
57
|
|
|
|
|
3345
|
|
8
|
57
|
|
|
57
|
|
212
|
use Test2::Util::HashBase qw{subevents buffered subtest_id}; |
|
57
|
|
|
|
|
955
|
|
|
57
|
|
|
|
|
261
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
43
|
|
|
43
|
0
|
47
|
my $self = shift; |
12
|
43
|
|
|
|
|
170
|
$self->SUPER::init(); |
13
|
43
|
|
100
|
|
|
103
|
$self->{+SUBEVENTS} ||= []; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub summary { |
17
|
4
|
|
|
4
|
1
|
4
|
my $self = shift; |
18
|
|
|
|
|
|
|
|
19
|
4
|
|
100
|
|
|
11
|
my $name = $self->{+NAME} || "Nameless Subtest"; |
20
|
|
|
|
|
|
|
|
21
|
4
|
|
|
|
|
4
|
my $todo = $self->{+TODO}; |
22
|
4
|
100
|
|
|
|
8
|
if ($todo) { |
|
|
100
|
|
|
|
|
|
23
|
1
|
|
|
|
|
3
|
$name .= " (TODO: $todo)"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
elsif (defined $todo) { |
26
|
1
|
|
|
|
|
2
|
$name .= " (TODO)" |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
4
|
|
|
|
|
12
|
return $name; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |