line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RandomFilePassesPathsToCheckRoutine; |
2
|
1
|
|
|
1
|
|
8
|
use base qw/RandomFileMethodBase/; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
68
|
|
3
|
1
|
|
|
1
|
|
6
|
use TestConstants; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
65
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
38
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Test::More; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub check_routine_gets_paths : Test(2) { |
11
|
6
|
|
|
6
|
0
|
4292
|
my $self = shift; |
12
|
6
|
|
|
|
|
17
|
my @files_shift = (); |
13
|
6
|
|
|
|
|
12
|
my @files_it = (); |
14
|
6
|
|
|
|
|
34
|
my %files = ('with shift' => \@files_shift, |
15
|
|
|
|
|
|
|
'with $_' => \@files_it); |
16
|
|
|
|
|
|
|
my %check_routine = ( |
17
|
18000
|
|
|
18000
|
|
69004
|
'with shift' => sub { push @files_shift, shift() }, |
18
|
18000
|
|
|
18000
|
|
66272
|
'with $_' => sub { push @files_it, $_ } |
19
|
6
|
|
|
|
|
48
|
); |
20
|
6
|
|
|
|
|
40
|
while (my ($check_desc, $check_func) = each %check_routine) { |
21
|
12
|
|
|
|
|
4090
|
my @args = (-dir => REC_DIR, |
22
|
|
|
|
|
|
|
-recursive => 1, |
23
|
|
|
|
|
|
|
-check => $check_func); |
24
|
12
|
|
|
|
|
67
|
my $exp = Set::Scalar->new(); |
25
|
12
|
|
|
|
|
1017
|
$exp->insert( $self->random_file(@args) ) for (1 .. SAMPLE_SIZE); |
26
|
12
|
|
|
|
|
761
|
my $found_files = Set::Scalar->new( @{$files{$check_desc}} ); |
|
12
|
|
|
|
|
613
|
|
27
|
|
|
|
|
|
|
|
28
|
12
|
|
|
|
|
148428
|
is $found_files, $exp, "Arguments passed to check $check_desc"; |
29
|
|
|
|
|
|
|
} |
30
|
1
|
|
|
1
|
|
480
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |