line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::RandomCheck::Types::Enum; |
2
|
4
|
|
|
4
|
|
13
|
use strict; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
84
|
|
3
|
4
|
|
|
4
|
|
10
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
69
|
|
4
|
4
|
|
|
4
|
|
11
|
use parent "Test::RandomCheck::Types"; |
|
4
|
|
|
|
|
2
|
|
|
4
|
|
|
|
|
11
|
|
5
|
4
|
|
|
4
|
|
162
|
use Class::Accessor::Lite (ro => [qw(items)]); |
|
4
|
|
|
|
|
77
|
|
|
4
|
|
|
|
|
22
|
|
6
|
4
|
|
|
4
|
|
1964
|
use List::MoreUtils (); |
|
4
|
|
|
|
|
26978
|
|
|
4
|
|
|
|
|
72
|
|
7
|
4
|
|
|
4
|
|
18
|
use Test::RandomCheck::ProbMonad; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
463
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub arbitrary { |
10
|
3111
|
|
|
3111
|
0
|
8059
|
my $self = shift; |
11
|
3111
|
|
|
|
|
2067
|
elements @{$self->items}; |
|
3111
|
|
|
|
|
4135
|
|
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub memoize_key { |
15
|
1212
|
|
|
1212
|
0
|
3376
|
my ($self, $item) = @_; |
16
|
1212
|
|
|
2124
|
|
1917
|
my $n = List::MoreUtils::first_index { $_ eq $item } @{$self->items}; |
|
2124
|
|
|
|
|
4458
|
|
|
1212
|
|
|
|
|
1430
|
|
17
|
1212
|
|
|
|
|
2356
|
$n; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |