| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package TAPx::Parser::Result::Plan; |
|
2
|
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
69
|
use strict; |
|
|
13
|
|
|
|
|
19
|
|
|
|
13
|
|
|
|
|
14362
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
13
|
|
|
13
|
|
78
|
use vars qw($VERSION @ISA); |
|
|
13
|
|
|
|
|
28
|
|
|
|
13
|
|
|
|
|
624
|
|
|
6
|
13
|
|
|
13
|
|
91
|
use TAPx::Parser::Result; |
|
|
13
|
|
|
|
|
27
|
|
|
|
13
|
|
|
|
|
2028
|
|
|
7
|
|
|
|
|
|
|
@ISA = 'TAPx::Parser::Result'; |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
TAPx::Parser::Result::Plan - Plan result token. |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 VERSION |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Version 0.50_07 |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=cut |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
$VERSION = '0.50_07'; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
This is a subclass of C. A token of this class will be |
|
24
|
|
|
|
|
|
|
returned if a plan line is encountered. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1..1 |
|
27
|
|
|
|
|
|
|
ok 1 - woo hooo! |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
C<1..1> is the plan. Gotta have a plan. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 OVERRIDDEN METHODS |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Mainly listed here to shut up the pitiful screams of the pod coverage tests. |
|
34
|
|
|
|
|
|
|
They keep me awake at night. |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=over 4 |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item * C |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item * C |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=back |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
############################################################################## |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 Instance methods |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head3 C |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
if ( $result->is_plan ) { |
|
53
|
|
|
|
|
|
|
print $result->plan; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This is merely a synonym for C. |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
|
59
|
|
|
|
|
|
|
|
|
60
|
66
|
|
|
66
|
1
|
396
|
sub plan { '1..' . shift->{tests_planned} } |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
############################################################################## |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head3 C |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
my $planned = $result->tests_planned; |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Returns the number of tests planned. For example, a plan of C<1..17> will |
|
69
|
|
|
|
|
|
|
cause this method to return '17'. |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
|
72
|
|
|
|
|
|
|
|
|
73
|
93
|
|
|
93
|
1
|
23593
|
sub tests_planned { shift->{tests_planned} } |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
############################################################################## |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head3 C |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
my $directive = $plan->directive; |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
If a SKIP directive is included with the plan, this method will return it. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1..0 # SKIP: why bother? |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
|
86
|
|
|
|
|
|
|
|
|
87
|
5
|
|
|
5
|
1
|
2594
|
sub directive { shift->{directive} } |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
############################################################################## |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head3 C |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
if ( $result->has_skip ) { ... } |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Returns a boolean value indicating whether or not this test has a SKIP |
|
96
|
|
|
|
|
|
|
directive. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head3 C |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
my $explanation = $plan->explanation; |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
If a SKIP directive was included with the plan, this method will return the |
|
103
|
|
|
|
|
|
|
explanation, if any. |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |
|
106
|
|
|
|
|
|
|
|
|
107
|
5
|
|
|
5
|
1
|
4443
|
sub explanation { shift->{explanation} } |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |