line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Easy::equivalence; |
2
|
6
|
|
|
6
|
|
34
|
use strict; |
|
6
|
|
|
|
|
23
|
|
|
6
|
|
|
|
|
266
|
|
3
|
6
|
|
|
6
|
|
32
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1034
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
0
|
|
|
0
|
0
|
|
my ($class, %args) = @_; |
7
|
|
|
|
|
|
|
return bless +{ |
8
|
|
|
|
|
|
|
test => $args{test}, |
9
|
0
|
|
|
0
|
|
|
explain => $args{explain} || sub { '' }, |
10
|
0
|
|
0
|
|
|
|
raw => $args{raw} || [], |
|
|
|
0
|
|
|
|
|
11
|
|
|
|
|
|
|
}, $class; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub check_value { |
15
|
0
|
|
|
0
|
0
|
|
my ($self, $got) = @_; |
16
|
0
|
|
|
|
|
|
return $self->{test}->($got); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub explain { |
20
|
0
|
|
|
0
|
0
|
|
my ($self, $got) = @_; |
21
|
0
|
|
|
|
|
|
return $self->{explain}->($got, $self->{raw}); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |