line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::Test::Class; |
2
|
|
|
|
|
|
|
$CHI::Test::Class::VERSION = '0.61'; |
3
|
20
|
|
|
20
|
|
17933
|
use Getopt::Long; |
|
20
|
|
|
|
|
218930
|
|
|
20
|
|
|
|
|
100
|
|
4
|
20
|
|
|
20
|
|
3151
|
use CHI::Util qw(can_load); |
|
20
|
|
|
|
|
46
|
|
|
20
|
|
|
|
|
917
|
|
5
|
20
|
|
|
20
|
|
123
|
use strict; |
|
20
|
|
|
|
|
41
|
|
|
20
|
|
|
|
|
398
|
|
6
|
20
|
|
|
20
|
|
99
|
use warnings; |
|
20
|
|
|
|
|
50
|
|
|
20
|
|
|
|
|
642
|
|
7
|
20
|
|
|
20
|
|
108
|
use base qw(Test::Class); |
|
20
|
|
|
|
|
41
|
|
|
20
|
|
|
|
|
14989
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub runtests { |
10
|
20
|
|
|
20
|
1
|
5790
|
my ($class) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Check for required modules |
13
|
|
|
|
|
|
|
# |
14
|
20
|
50
|
|
|
|
161
|
if ( my $required_modules = $class->required_modules ) { |
15
|
20
|
|
|
|
|
140
|
while ( my ( $key, $value ) = each(%$required_modules) ) { |
16
|
3
|
100
|
|
|
|
18
|
unless ( can_load($key) ) { |
17
|
1
|
|
|
|
|
12
|
$class->SKIP_ALL("one of required modules not installed: $key"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Only run tests directly in $class. |
23
|
|
|
|
|
|
|
# |
24
|
19
|
|
|
|
|
211
|
my $test_obj = $class->new(); |
25
|
19
|
|
|
|
|
5017
|
Test::Class::runtests($test_obj); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub required_modules { |
29
|
18
|
|
|
18
|
0
|
104
|
return {}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |