line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Subtest; |
2
|
54
|
|
|
54
|
|
446
|
use strict; |
|
54
|
|
|
|
|
46
|
|
|
54
|
|
|
|
|
1177
|
|
3
|
54
|
|
|
54
|
|
183
|
use warnings; |
|
54
|
|
|
|
|
56
|
|
|
54
|
|
|
|
|
1628
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000042'; |
6
|
|
|
|
|
|
|
|
7
|
54
|
|
|
54
|
|
162
|
use base 'Test2::Event::Ok'; |
|
54
|
|
|
|
|
49
|
|
|
54
|
|
|
|
|
3341
|
|
8
|
54
|
|
|
54
|
|
195
|
use Test2::Util::HashBase qw{subevents buffered subtest_id}; |
|
54
|
|
|
|
|
40
|
|
|
54
|
|
|
|
|
217
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
42
|
|
|
42
|
0
|
32
|
my $self = shift; |
12
|
42
|
|
|
|
|
113
|
$self->SUPER::init(); |
13
|
42
|
|
100
|
|
|
106
|
$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
|
|
|
|
|
3
|
my $todo = $self->{+TODO}; |
22
|
4
|
100
|
|
|
|
10
|
if ($todo) { |
|
|
100
|
|
|
|
|
|
23
|
1
|
|
|
|
|
3
|
$name .= " (TODO: $todo)"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
elsif (defined $todo) { |
26
|
1
|
|
|
|
|
1
|
$name .= " (TODO)" |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
4
|
|
|
|
|
10
|
return $name; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |