line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Easy::equivalence; |
2
|
7
|
|
|
7
|
|
34
|
use strict; |
|
7
|
|
|
|
|
22
|
|
|
7
|
|
|
|
|
299
|
|
3
|
7
|
|
|
7
|
|
35
|
use warnings; |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
961
|
|
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; |