line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
1
|
|
|
1
|
|
7
|
package Test2::Event::Subtest; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
4
|
|
|
|
|
|
|
use warnings; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.302073'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
9
|
1
|
|
|
1
|
|
61
|
BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
10
|
|
|
|
|
|
|
use Test2::Util::HashBase qw{subevents buffered subtest_id}; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
0
|
0
|
|
sub init { |
13
|
0
|
|
|
|
|
|
my $self = shift; |
14
|
0
|
|
0
|
|
|
|
$self->SUPER::init(); |
15
|
0
|
0
|
|
|
|
|
$self->{+SUBEVENTS} ||= []; |
16
|
0
|
|
|
|
|
|
if ($self->{+EFFECTIVE_PASS}) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$_->set_effective_pass(1) for grep { $_->can('effective_pass') } @{$self->{+SUBEVENTS}}; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
5
|
{ |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
266
|
|
22
|
|
|
|
|
|
|
no warnings 'redefine'; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
|
|
sub set_subevents { |
25
|
0
|
|
|
|
|
|
my $self = shift; |
26
|
|
|
|
|
|
|
my @subevents = @_; |
27
|
0
|
0
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
if ($self->{+EFFECTIVE_PASS}) { |
|
0
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$_->set_effective_pass(1) for grep { $_->can('effective_pass') } @subevents; |
30
|
|
|
|
|
|
|
} |
31
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$self->{+SUBEVENTS} = \@subevents; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
0
|
0
|
|
sub set_effective_pass { |
36
|
0
|
|
|
|
|
|
my $self = shift; |
37
|
|
|
|
|
|
|
my ($pass) = @_; |
38
|
0
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
if ($pass) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
$_->set_effective_pass(1) for grep { $_->can('effective_pass') } @{$self->{+SUBEVENTS}}; |
41
|
|
|
|
|
|
|
} |
42
|
0
|
|
|
|
|
|
elsif ($self->{+EFFECTIVE_PASS} && !$pass) { |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
43
|
0
|
0
|
0
|
|
|
|
for my $s (grep { $_->can('effective_pass') } @{$self->{+SUBEVENTS}}) { |
44
|
|
|
|
|
|
|
$_->set_effective_pass(0) unless $s->can('todo') && defined $s->todo; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
0
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
$self->{+EFFECTIVE_PASS} = $pass; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
0
|
1
|
|
sub summary { |
53
|
|
|
|
|
|
|
my $self = shift; |
54
|
0
|
|
0
|
|
|
|
|
55
|
|
|
|
|
|
|
my $name = $self->{+NAME} || "Nameless Subtest"; |
56
|
0
|
|
|
|
|
|
|
57
|
0
|
0
|
|
|
|
|
my $todo = $self->{+TODO}; |
|
|
0
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
if ($todo) { |
59
|
|
|
|
|
|
|
$name .= " (TODO: $todo)"; |
60
|
|
|
|
|
|
|
} |
61
|
0
|
|
|
|
|
|
elsif (defined $todo) { |
62
|
|
|
|
|
|
|
$name .= " (TODO)" |
63
|
|
|
|
|
|
|
} |
64
|
0
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
return $name; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
__END__ |