line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- mode: Perl; -*- |
2
|
|
|
|
|
|
|
package Eve::ItemTestBase; |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
2226
|
use parent qw(Eve::Test); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
71
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
47
|
|
7
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
40
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
8
|
use Test::More; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
10
|
2
|
|
|
2
|
|
1936
|
use Test::Exception; |
|
2
|
|
|
|
|
5769
|
|
|
2
|
|
|
|
|
18
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Eve::ItemTestBase->SKIP_CLASS(1); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
B - a base class for all item classes. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 SYNOPSIS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
package SomeItemTest; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
use parent qw(Eve::ItemTestBase); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# put your item test content here |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
B is the class that provides test case setup and some |
29
|
|
|
|
|
|
|
mandatory tests required to pass for all item classes. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 METHODS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 B |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Returns test arguments for items, can be overridden to add inheritable |
36
|
|
|
|
|
|
|
properties. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub get_argument_list { |
41
|
6
|
|
|
6
|
1
|
2107
|
return {}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 B |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Performs initialization tests. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|
50
|
2
|
|
|
2
|
1
|
112
|
sub test_init {} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 B |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Performs class constant tests. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=cut |
57
|
|
|
|
|
|
|
|
58
|
2
|
|
|
2
|
1
|
1217
|
sub test_constants {} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 B |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Performs equality method implementation tests. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub test_eq : Test(1) { |
67
|
2
|
|
|
2
|
1
|
236
|
my $self = shift; |
68
|
|
|
|
|
|
|
|
69
|
2
|
|
|
2
|
|
14
|
throws_ok(sub { $self->{'item'}->eq() }, 'Eve::Error::NotImplemented'); |
|
2
|
|
|
|
|
96
|
|
70
|
2
|
|
|
2
|
|
714
|
} |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
15
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SEE ALSO |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=over 4 |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=item L |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item L |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Copyright 2010-2013 Sergey Konoplev, Igor Zinovyev. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
87
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
88
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 AUTHOR |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=over 4 |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item L |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item L |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
1; |