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