line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Skip; |
2
|
246
|
|
|
246
|
|
2147
|
use strict; |
|
246
|
|
|
|
|
532
|
|
|
246
|
|
|
|
|
7326
|
|
3
|
246
|
|
|
246
|
|
1249
|
use warnings; |
|
246
|
|
|
|
|
594
|
|
|
246
|
|
|
|
|
13664
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302182'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
246
|
|
|
246
|
|
1552
|
BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } |
|
246
|
|
|
|
|
14090
|
|
9
|
246
|
|
|
246
|
|
1729
|
use Test2::Util::HashBase qw{reason}; |
|
246
|
|
|
|
|
598
|
|
|
246
|
|
|
|
|
1713
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
26
|
|
|
26
|
0
|
55
|
my $self = shift; |
13
|
26
|
|
|
|
|
143
|
$self->SUPER::init; |
14
|
26
|
|
|
|
|
71
|
$self->{+EFFECTIVE_PASS} = 1; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
0
|
1
|
0
|
sub causes_fail { 0 } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub summary { |
20
|
2
|
|
|
2
|
1
|
4
|
my $self = shift; |
21
|
2
|
|
|
|
|
12
|
my $out = $self->SUPER::summary(@_); |
22
|
|
|
|
|
|
|
|
23
|
2
|
100
|
|
|
|
7
|
if (my $reason = $self->reason) { |
24
|
1
|
|
|
|
|
4
|
$out .= " (SKIP: $reason)"; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else { |
27
|
1
|
|
|
|
|
3
|
$out .= " (SKIP)"; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
9
|
return $out; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub extra_amnesty { |
34
|
26
|
|
|
26
|
0
|
56
|
my $self = shift; |
35
|
|
|
|
|
|
|
|
36
|
26
|
|
|
|
|
50
|
my @out; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
push @out => { |
39
|
|
|
|
|
|
|
tag => 'TODO', |
40
|
|
|
|
|
|
|
details => $self->{+TODO}, |
41
|
26
|
100
|
|
|
|
100
|
} if defined $self->{+TODO}; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
push @out => { |
44
|
|
|
|
|
|
|
tag => 'skip', |
45
|
26
|
|
|
|
|
115
|
details => $self->{+REASON}, |
46
|
|
|
|
|
|
|
inherited => 0, |
47
|
|
|
|
|
|
|
}; |
48
|
|
|
|
|
|
|
|
49
|
26
|
|
|
|
|
110
|
return @out; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=encoding UTF-8 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Test2::Event::Skip - Skip event type |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Skip events bump test counts just like L<Test2::Event::Ok> events, but |
67
|
|
|
|
|
|
|
they can never fail. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use Test2::API qw/context/; |
72
|
|
|
|
|
|
|
use Test2::Event::Skip; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $ctx = context(); |
75
|
|
|
|
|
|
|
my $event = $ctx->skip($name, $reason); |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
or: |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
my $ctx = context(); |
80
|
|
|
|
|
|
|
my $event = $ctx->send_event( |
81
|
|
|
|
|
|
|
'Skip', |
82
|
|
|
|
|
|
|
name => $name, |
83
|
|
|
|
|
|
|
reason => $reason, |
84
|
|
|
|
|
|
|
); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 ACCESSORS |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=over 4 |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item $reason = $e->reason |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The original true/false value of whatever was passed into the event (but |
93
|
|
|
|
|
|
|
reduced down to 1 or 0). |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=back |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SOURCE |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
The source code repository for Test2 can be found at |
100
|
|
|
|
|
|
|
F<http://github.com/Test-More/test-more/>. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 MAINTAINERS |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=over 4 |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHORS |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=over 4 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=back |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 COPYRIGHT |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
123
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
See F<http://www.perl.com/perl/misc/Artistic.html> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |