line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::RandomCheck::Types::Enum; |
2
|
4
|
|
|
4
|
|
14
|
use strict; |
|
4
|
|
|
|
|
2
|
|
|
4
|
|
|
|
|
89
|
|
3
|
4
|
|
|
4
|
|
13
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
78
|
|
4
|
4
|
|
|
4
|
|
11
|
use parent "Test::RandomCheck::Types"; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
14
|
|
5
|
4
|
|
|
4
|
|
186
|
use Class::Accessor::Lite (ro => [qw(items)]); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
19
|
|
6
|
4
|
|
|
4
|
|
1159
|
use List::MoreUtils (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Test::RandomCheck::ProbMonad; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub arbitrary { |
10
|
|
|
|
|
|
|
my $self = shift; |
11
|
|
|
|
|
|
|
elements @{$self->items}; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub memoize_key { |
15
|
|
|
|
|
|
|
my ($self, $item) = @_; |
16
|
|
|
|
|
|
|
my $n = List::MoreUtils::first_index { $_ eq $item } @{$self->items}; |
17
|
|
|
|
|
|
|
$n; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |