line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Fail; |
2
|
246
|
|
|
246
|
|
1853
|
use strict; |
|
246
|
|
|
|
|
565
|
|
|
246
|
|
|
|
|
7593
|
|
3
|
246
|
|
|
246
|
|
1307
|
use warnings; |
|
246
|
|
|
|
|
525
|
|
|
246
|
|
|
|
|
10057
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302180'; |
6
|
|
|
|
|
|
|
|
7
|
246
|
|
|
246
|
|
1503
|
use Test2::EventFacet::Info; |
|
246
|
|
|
|
|
547
|
|
|
246
|
|
|
|
|
15067
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
BEGIN { |
10
|
246
|
|
|
246
|
|
1834
|
require Test2::Event; |
11
|
246
|
|
|
|
|
4412
|
our @ISA = qw(Test2::Event); |
12
|
246
|
|
|
|
|
8330
|
*META_KEY = \&Test2::Util::ExternalMeta::META_KEY; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
246
|
|
|
246
|
|
1670
|
use Test2::Util::HashBase qw{ -name -info }; |
|
246
|
|
|
|
|
612
|
|
|
246
|
|
|
|
|
1764
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
############# |
18
|
|
|
|
|
|
|
# Old API |
19
|
1
|
|
|
1
|
1
|
12
|
sub summary { "fail" } |
20
|
1
|
|
|
1
|
1
|
5
|
sub increments_count { 1 } |
21
|
1
|
|
|
1
|
1
|
5
|
sub diagnostics { 0 } |
22
|
1
|
|
|
1
|
1
|
6
|
sub no_display { 0 } |
23
|
1
|
|
|
1
|
1
|
5
|
sub subtest_id { undef } |
24
|
1
|
|
|
1
|
1
|
6
|
sub terminate { () } |
25
|
12
|
|
|
12
|
1
|
34
|
sub global { () } |
26
|
1
|
|
|
1
|
1
|
4
|
sub sets_plan { () } |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub causes_fail { |
29
|
3
|
|
|
3
|
1
|
7
|
my $self = shift; |
30
|
3
|
100
|
66
|
|
|
36
|
return 0 if $self->{+AMNESTY} && @{$self->{+AMNESTY}}; |
|
2
|
|
|
|
|
16
|
|
31
|
1
|
|
|
|
|
5
|
return 1; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
############# |
35
|
|
|
|
|
|
|
# New API |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub add_info { |
38
|
24
|
|
|
24
|
0
|
41
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
24
|
|
|
|
|
49
|
for my $in (@_) { |
41
|
24
|
50
|
|
|
|
113
|
$in = {%$in} if ref($in) ne 'ARRAY'; |
42
|
24
|
|
|
|
|
128
|
$in = Test2::EventFacet::Info->new($in); |
43
|
|
|
|
|
|
|
|
44
|
24
|
|
|
|
|
47
|
push @{$self->{+INFO}} => $in; |
|
24
|
|
|
|
|
97
|
|
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub facet_data { |
49
|
52
|
|
|
52
|
1
|
88
|
my $self = shift; |
50
|
52
|
|
|
|
|
163
|
my $out = $self->common_facet_data; |
51
|
|
|
|
|
|
|
|
52
|
52
|
|
|
|
|
111
|
$out->{about}->{details} = 'fail'; |
53
|
|
|
|
|
|
|
|
54
|
52
|
|
|
|
|
163
|
$out->{assert} = {pass => 0, details => $self->{+NAME}}; |
55
|
|
|
|
|
|
|
|
56
|
52
|
100
|
|
|
|
149
|
$out->{info} = [map {{ %{$_} }} @{$self->{+INFO}}] if $self->{+INFO}; |
|
31
|
|
|
|
|
46
|
|
|
31
|
|
|
|
|
161
|
|
|
19
|
|
|
|
|
53
|
|
57
|
|
|
|
|
|
|
|
58
|
52
|
|
|
|
|
235
|
return $out; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |