line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Bail; |
2
|
107
|
|
|
107
|
|
1144
|
use strict; |
|
107
|
|
|
|
|
655
|
|
|
107
|
|
|
|
|
2680
|
|
3
|
107
|
|
|
107
|
|
507
|
use warnings; |
|
107
|
|
|
|
|
195
|
|
|
107
|
|
|
|
|
2901
|
|
4
|
|
|
|
|
|
|
|
5
|
107
|
|
|
107
|
|
522
|
use Test::Stream::Formatter::TAP qw/OUT_STD/; |
|
107
|
|
|
|
|
197
|
|
|
107
|
|
|
|
|
785
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Test::Stream::Event( |
8
|
107
|
|
|
|
|
720
|
accessors => [qw/reason/], |
9
|
107
|
|
|
107
|
|
597
|
); |
|
107
|
|
|
|
|
250
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub to_tap { |
12
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
13
|
|
|
|
|
|
|
return [ |
14
|
2
|
|
|
|
|
10
|
OUT_STD, |
15
|
|
|
|
|
|
|
"Bail out! " . $self->reason . "\n", |
16
|
|
|
|
|
|
|
]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub update_state { |
20
|
11
|
|
|
11
|
1
|
28
|
my $self = shift; |
21
|
11
|
|
|
|
|
21
|
my ($state) = @_; |
22
|
|
|
|
|
|
|
|
23
|
11
|
|
|
|
|
55
|
$state->set_bailed_out($self); |
24
|
11
|
|
|
|
|
77
|
$state->bump_fail; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
# Make sure the tests terminate |
28
|
11
|
|
|
11
|
1
|
37
|
sub terminate { 255 }; |
29
|
|
|
|
|
|
|
|
30
|
11
|
|
|
11
|
1
|
41
|
sub global { 1 }; |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
1
|
14
|
sub causes_fail { 1 } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |