| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#line 1 |
|
2
|
1
|
|
|
1
|
|
4
|
package Test2::Event::Ok; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
20
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
37
|
|
|
4
|
|
|
|
|
|
|
use warnings; |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.302073'; |
|
7
|
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
437
|
|
|
|
1
|
|
|
|
|
369
|
|
|
9
|
1
|
|
|
|
|
4
|
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } |
|
10
|
|
|
|
|
|
|
use Test2::Util::HashBase qw{ |
|
11
|
1
|
|
|
1
|
|
5
|
pass effective_pass name todo |
|
|
1
|
|
|
|
|
1
|
|
|
12
|
|
|
|
|
|
|
}; |
|
13
|
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
0
|
|
sub init { |
|
15
|
|
|
|
|
|
|
my $self = shift; |
|
16
|
|
|
|
|
|
|
|
|
17
|
0
|
0
|
|
|
|
|
# Do not store objects here, only true or false |
|
18
|
0
|
|
0
|
|
|
|
$self->{+PASS} = $self->{+PASS} ? 1 : 0; |
|
19
|
|
|
|
|
|
|
$self->{+EFFECTIVE_PASS} = $self->{+PASS} || (defined($self->{+TODO}) ? 1 : 0); |
|
20
|
|
|
|
|
|
|
} |
|
21
|
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
5
|
{ |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
229
|
|
|
23
|
|
|
|
|
|
|
no warnings 'redefine'; |
|
24
|
0
|
|
|
0
|
|
|
sub set_todo { |
|
25
|
0
|
|
|
|
|
|
my $self = shift; |
|
26
|
0
|
|
|
|
|
|
my ($todo) = @_; |
|
27
|
0
|
0
|
|
|
|
|
$self->{+TODO} = $todo; |
|
28
|
|
|
|
|
|
|
$self->{+EFFECTIVE_PASS} = defined($todo) ? 1 : $self->{+PASS}; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
} |
|
31
|
0
|
|
|
0
|
1
|
|
|
|
32
|
|
|
|
|
|
|
sub increments_count { 1 }; |
|
33
|
0
|
|
|
0
|
1
|
|
|
|
34
|
|
|
|
|
|
|
sub causes_fail { !$_[0]->{+EFFECTIVE_PASS} } |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
0
|
1
|
|
sub summary { |
|
37
|
|
|
|
|
|
|
my $self = shift; |
|
38
|
0
|
|
0
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $name = $self->{+NAME} || "Nameless Assertion"; |
|
40
|
0
|
|
|
|
|
|
|
|
41
|
0
|
0
|
|
|
|
|
my $todo = $self->{+TODO}; |
|
|
|
0
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
if ($todo) { |
|
43
|
|
|
|
|
|
|
$name .= " (TODO: $todo)"; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
0
|
|
|
|
|
|
elsif (defined $todo) { |
|
46
|
|
|
|
|
|
|
$name .= " (TODO)" |
|
47
|
|
|
|
|
|
|
} |
|
48
|
0
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
return $name; |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |