line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Proto::TestCase; |
2
|
14
|
|
|
14
|
|
25644
|
use 5.008; |
|
14
|
|
|
|
|
45
|
|
|
14
|
|
|
|
|
525
|
|
3
|
14
|
|
|
14
|
|
76
|
use strict; |
|
14
|
|
|
|
|
36
|
|
|
14
|
|
|
|
|
419
|
|
4
|
14
|
|
|
14
|
|
68
|
use warnings; |
|
14
|
|
|
|
|
26
|
|
|
14
|
|
|
|
|
417
|
|
5
|
14
|
|
|
14
|
|
971
|
use Moo; |
|
14
|
|
|
|
|
17156
|
|
|
14
|
|
|
|
|
86
|
|
6
|
|
|
|
|
|
|
with('Test::Proto::Role::Tagged'); |
7
|
14
|
|
|
14
|
|
6653
|
use Test::Proto::Common (); |
|
14
|
|
|
|
|
40
|
|
|
14
|
|
|
|
|
1660
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Test::Proto::TestCase - an individual test case |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Holds attributes to describe the test - the name of the test, the parameters (data) and the code to be executed. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
All the attributes are chainable when used as setters (they return the TestCase). |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
In addition to those documented below, the TestCase can have tags - see L for details. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 ATTRIBUTES |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head3 name |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Returns the name of the test. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=cut |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has 'name' => default => sub { '[Anonymous Test Case]' }, |
34
|
|
|
|
|
|
|
is => 'rw'; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head3 code |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Returns the code. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has 'code' => is => 'rw'; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head3 data |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Returns the data. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
has 'data' => is => 'rw', |
51
|
|
|
|
|
|
|
default => sub { {}; }; |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
around qw(name code data) => \&Test::Proto::Common::chainable; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |