line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CHI::Test::Class; |
2
|
|
|
|
|
|
|
$CHI::Test::Class::VERSION = '0.60'; |
3
|
20
|
|
|
20
|
|
14914
|
use Getopt::Long; |
|
20
|
|
|
|
|
193097
|
|
|
20
|
|
|
|
|
120
|
|
4
|
20
|
|
|
20
|
|
3323
|
use CHI::Util qw(can_load); |
|
20
|
|
|
|
|
34
|
|
|
20
|
|
|
|
|
1007
|
|
5
|
20
|
|
|
20
|
|
88
|
use strict; |
|
20
|
|
|
|
|
30
|
|
|
20
|
|
|
|
|
670
|
|
6
|
20
|
|
|
20
|
|
92
|
use warnings; |
|
20
|
|
|
|
|
31
|
|
|
20
|
|
|
|
|
666
|
|
7
|
20
|
|
|
20
|
|
90
|
use base qw(Test::Class); |
|
20
|
|
|
|
|
28
|
|
|
20
|
|
|
|
|
15016
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub runtests { |
10
|
20
|
|
|
20
|
1
|
2885
|
my ($class) = @_; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Check for required modules |
13
|
|
|
|
|
|
|
# |
14
|
20
|
50
|
|
|
|
192
|
if ( my $required_modules = $class->required_modules ) { |
15
|
20
|
|
|
|
|
131
|
while ( my ( $key, $value ) = each(%$required_modules) ) { |
16
|
2
|
50
|
|
|
|
8
|
unless ( can_load($key) ) { |
17
|
2
|
|
|
|
|
25
|
$class->SKIP_ALL("one of required modules not installed: $key"); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# Only run tests directly in $class. |
23
|
|
|
|
|
|
|
# |
24
|
18
|
|
|
|
|
225
|
my $test_obj = $class->new(); |
25
|
18
|
|
|
|
|
5213
|
Test::Class::runtests($test_obj); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub required_modules { |
29
|
18
|
|
|
18
|
0
|
99
|
return {}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |