line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
# $URL$ |
3
|
|
|
|
|
|
|
# $Date$ |
4
|
|
|
|
|
|
|
# $Author$ |
5
|
|
|
|
|
|
|
# $Revision$ |
6
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
7
|
|
|
|
|
|
|
package Wetware::Test::Class; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
64
|
|
10
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
1050
|
use Test::Class; |
|
2
|
|
|
|
|
38221
|
|
|
2
|
|
|
|
|
51
|
|
13
|
2
|
|
|
2
|
|
15
|
use base 'Test::Class'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
254
|
|
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
1297
|
use Wetware::Test::Utilities qw(is_testsuite_module); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
369
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
18
|
|
|
|
|
|
|
our $VERSION = 0.02; |
19
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
20
|
2
|
|
|
2
|
|
113
|
INIT { Test::Class->runtests() } |
21
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub is_test_class { |
24
|
0
|
|
|
0
|
0
|
|
my ( $class, $file, $dir ) = @_; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# return unless it's a .pm (the default) |
27
|
0
|
0
|
|
|
|
|
return unless $class->SUPER::is_test_class( $file, $dir ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# because the simple Module::Build will copy the .svn and CVS file |
30
|
|
|
|
|
|
|
# and we do not consider them valid modules to be testing. |
31
|
0
|
0
|
0
|
|
|
|
return if ( $dir =~ m{/CVS/} || $dir =~ m{/.svn/} ); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
# and only allow those that is_testsuite_module() allows |
34
|
0
|
|
|
|
|
|
return is_testsuite_module($file); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
#------------------------------------------------------------------------------ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |