line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::RandomCheck::Types::AllInteger; |
2
|
4
|
|
|
4
|
|
13
|
use strict; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
83
|
|
3
|
4
|
|
|
4
|
|
12
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
71
|
|
4
|
4
|
|
|
4
|
|
9
|
use parent "Test::RandomCheck::Types"; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
12
|
|
5
|
4
|
|
|
4
|
|
145
|
use Config (); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
51
|
|
6
|
4
|
|
|
4
|
|
10
|
use Test::RandomCheck::ProbMonad; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
526
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub arbitrary { |
9
|
|
|
|
|
|
|
gen { |
10
|
3888
|
|
|
3888
|
|
2732
|
my ($rand, $size) = @_; |
11
|
3888
|
100
|
|
|
|
4830
|
return 0 if $size <= 0; |
12
|
|
|
|
|
|
|
|
13
|
3856
|
|
|
|
|
14001
|
my $bits = int (($Config::Config{ivsize} * 8 - 1) * $size / 100); |
14
|
3856
|
|
|
|
|
4061
|
my $n = 1 << $bits; |
15
|
3856
|
|
|
|
|
6533
|
$rand->next_int(- $n, $n - 1); |
16
|
3457
|
|
|
3457
|
0
|
13124
|
}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub memoize_key { |
20
|
3108
|
|
|
3108
|
0
|
7955
|
my ($self, $n) = @_; |
21
|
3108
|
|
|
|
|
4160
|
$n; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |