line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Stream::Event::Bail; |
2
|
107
|
|
|
107
|
|
666
|
use strict; |
|
107
|
|
|
|
|
122
|
|
|
107
|
|
|
|
|
2449
|
|
3
|
107
|
|
|
107
|
|
318
|
use warnings; |
|
107
|
|
|
|
|
128
|
|
|
107
|
|
|
|
|
2270
|
|
4
|
|
|
|
|
|
|
|
5
|
107
|
|
|
107
|
|
325
|
use Test::Stream::Formatter::TAP qw/OUT_STD/; |
|
107
|
|
|
|
|
118
|
|
|
107
|
|
|
|
|
529
|
|
6
|
|
|
|
|
|
|
|
7
|
107
|
|
|
107
|
|
395
|
use base 'Test::Stream::Event'; |
|
107
|
|
|
|
|
131
|
|
|
107
|
|
|
|
|
6492
|
|
8
|
107
|
|
|
107
|
|
431
|
use Test::Stream::HashBase accessors => [qw/reason/]; |
|
107
|
|
|
|
|
137
|
|
|
107
|
|
|
|
|
631
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub to_tap { |
11
|
2
|
|
|
2
|
1
|
4
|
my $self = shift; |
12
|
|
|
|
|
|
|
return [ |
13
|
2
|
|
|
|
|
8
|
OUT_STD, |
14
|
|
|
|
|
|
|
"Bail out! " . $self->reason . "\n", |
15
|
|
|
|
|
|
|
]; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub update_state { |
19
|
11
|
|
|
11
|
1
|
22
|
my $self = shift; |
20
|
11
|
|
|
|
|
17
|
my ($state) = @_; |
21
|
|
|
|
|
|
|
|
22
|
11
|
|
|
|
|
43
|
$state->set_bailed_out($self); |
23
|
11
|
|
|
|
|
54
|
$state->bump_fail; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# Make sure the tests terminate |
27
|
11
|
|
|
11
|
1
|
25
|
sub terminate { 255 }; |
28
|
|
|
|
|
|
|
|
29
|
11
|
|
|
11
|
1
|
27
|
sub global { 1 }; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
1
|
9
|
sub causes_fail { 1 } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |