line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
###################################################################### |
2
|
|
|
|
|
|
|
# $Id: BaseCacheTester.pm,v 1.7 2002/04/07 17:04:46 dclinton Exp $ |
3
|
|
|
|
|
|
|
# Copyright (C) 2001-2003 DeWitt Clinton All Rights Reserved |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Software distributed under the License is distributed on an "AS |
6
|
|
|
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or |
7
|
|
|
|
|
|
|
# implied. See the License for the specific language governing |
8
|
|
|
|
|
|
|
# rights and limitations under the License. |
9
|
|
|
|
|
|
|
###################################################################### |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Cache::BaseCacheTester; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
1424
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new |
19
|
|
|
|
|
|
|
{ |
20
|
6
|
|
|
6
|
1
|
911
|
my ( $proto, $base_test_count ) = @_; |
21
|
6
|
|
33
|
|
|
123
|
my $class = ref( $proto ) || $proto; |
22
|
6
|
|
|
|
|
16
|
my $self = {}; |
23
|
6
|
|
|
|
|
18
|
bless ( $self, $class ); |
24
|
|
|
|
|
|
|
|
25
|
6
|
50
|
|
|
|
28
|
$base_test_count = defined $base_test_count ? $base_test_count : 0 ; |
26
|
|
|
|
|
|
|
|
27
|
6
|
|
|
|
|
64
|
$self->_set_test_count( $base_test_count ); |
28
|
|
|
|
|
|
|
|
29
|
6
|
|
|
|
|
19
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub ok |
34
|
|
|
|
|
|
|
{ |
35
|
158
|
|
|
158
|
1
|
302
|
my ( $self ) = @_; |
36
|
|
|
|
|
|
|
|
37
|
158
|
|
|
|
|
709
|
my $test_count = $self->_get_test_count( ); |
38
|
|
|
|
|
|
|
|
39
|
158
|
|
|
|
|
68542
|
print "ok $test_count\n"; |
40
|
|
|
|
|
|
|
|
41
|
158
|
|
|
|
|
809
|
$self->_increment_test_count( ); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub not_ok |
46
|
|
|
|
|
|
|
{ |
47
|
0
|
|
|
0
|
1
|
0
|
my ( $self, $message ) = @_; |
48
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
0
|
my $test_count = $self->_get_test_count( ); |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
0
|
print "not ok $test_count # failed '$message'\n"; |
52
|
|
|
|
|
|
|
|
53
|
0
|
|
|
|
|
0
|
$self->_increment_test_count( ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub skip |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
|
|
0
|
1
|
0
|
my ( $self, $message ) = @_; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
0
|
my $test_count = $self->_get_test_count( ); |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
0
|
print "ok $test_count # skipped $message \n"; |
64
|
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
0
|
$self->_increment_test_count( ); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub _set_test_count |
70
|
|
|
|
|
|
|
{ |
71
|
6
|
|
|
6
|
|
14
|
my ( $self, $test_count ) = @_; |
72
|
|
|
|
|
|
|
|
73
|
6
|
|
|
|
|
60
|
$self->{_Test_Count} = $test_count; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub _get_test_count |
78
|
|
|
|
|
|
|
{ |
79
|
160
|
|
|
160
|
|
302
|
my ( $self ) = @_; |
80
|
|
|
|
|
|
|
|
81
|
160
|
|
|
|
|
812
|
return $self->{_Test_Count}; |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub _increment_test_count |
86
|
|
|
|
|
|
|
{ |
87
|
158
|
|
|
158
|
|
280
|
my ( $self ) = @_; |
88
|
|
|
|
|
|
|
|
89
|
158
|
|
|
|
|
3053
|
$self->{_Test_Count}++; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
__END__ |