line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
6
|
|
|
6
|
|
43
|
package Test2::Event::Ok; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
167
|
|
3
|
6
|
|
|
6
|
|
29
|
use strict; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
422
|
|
4
|
|
|
|
|
|
|
use warnings; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.302073'; |
7
|
|
|
|
|
|
|
|
8
|
6
|
|
|
6
|
|
2779
|
|
|
6
|
|
|
|
|
3103
|
|
9
|
6
|
|
|
|
|
30
|
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } |
10
|
|
|
|
|
|
|
use Test2::Util::HashBase qw{ |
11
|
6
|
|
|
6
|
|
42
|
pass effective_pass name todo |
|
6
|
|
|
|
|
10
|
|
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
|
14
|
0
|
|
|
0
|
0
|
0
|
sub init { |
15
|
|
|
|
|
|
|
my $self = shift; |
16
|
|
|
|
|
|
|
|
17
|
0
|
0
|
|
|
|
0
|
# Do not store objects here, only true or false |
18
|
0
|
|
0
|
|
|
0
|
$self->{+PASS} = $self->{+PASS} ? 1 : 0; |
19
|
|
|
|
|
|
|
$self->{+EFFECTIVE_PASS} = $self->{+PASS} || (defined($self->{+TODO}) ? 1 : 0); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
6
|
|
|
6
|
|
44
|
{ |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
1309
|
|
23
|
|
|
|
|
|
|
no warnings 'redefine'; |
24
|
0
|
|
|
0
|
|
0
|
sub set_todo { |
25
|
0
|
|
|
|
|
0
|
my $self = shift; |
26
|
0
|
|
|
|
|
0
|
my ($todo) = @_; |
27
|
0
|
0
|
|
|
|
0
|
$self->{+TODO} = $todo; |
28
|
|
|
|
|
|
|
$self->{+EFFECTIVE_PASS} = defined($todo) ? 1 : $self->{+PASS}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
9
|
|
|
9
|
1
|
32
|
|
32
|
|
|
|
|
|
|
sub increments_count { 1 }; |
33
|
9
|
|
|
9
|
1
|
45
|
|
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__ |