Driver/MemcachedFast/Test/Class.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 42 CC 2 SCAR 10.6
CC
2
Cov
0%
runtests
6.0
is_internal
2.0
internal_only
2.0
CRAP 2.9
1 package CHI::Driver::MemcachedFast::Test::Class;
2 use CHI::Driver::MemcachedFast::Util qw(require_dynamic);
3 use Getopt::Long;
4 use strict;
5 use warnings;
6 use base qw(Test::Class);
7  
8 sub runtests {
9 my ($class) = @_;
10  
11 # Handle -m flag in case test script is being run directly.
12 #
13 GetOptions( 'm|method=s' => sub { $ENV{TEST_METHOD} = ".*" . $_[1] . ".*" },
14 );
15  
16 # Check for internal_only
17 #
18 if ( $class->internal_only && !$class->is_internal ) {
19 $class->skip_all('internal test only');
20 }
21  
22 # Only run tests directly in $class.
23 #
24 my $test_obj = $class->new();
25 Test::Class::runtests($test_obj);
26 }
27  
28 sub is_internal {
29 return $ENV{CHI_DRIVER_MEMCACHEDFAST_INTERNAL_TESTS};
30 }
31  
32 sub internal_only {
33 return 0;
34 }
35  
36 1;