line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Code 1.202; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
356
|
use Test::Deep::Cmp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub init |
9
|
|
|
|
|
|
|
{ |
10
|
3
|
|
|
3
|
0
|
6
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
3
|
|
50
|
|
|
12
|
my $code = shift || die "No coderef supplied"; |
13
|
|
|
|
|
|
|
|
14
|
3
|
|
|
|
|
42
|
$self->{code} = $code; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub descend |
18
|
|
|
|
|
|
|
{ |
19
|
3
|
|
|
3
|
0
|
5
|
my $self = shift; |
20
|
3
|
|
|
|
|
6
|
my $got = shift; |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
7
|
my ($ok, $diag) = &{$self->{code}}($got); |
|
3
|
|
|
|
|
10
|
|
23
|
|
|
|
|
|
|
|
24
|
3
|
|
|
|
|
31
|
$self->data->{diag} = $diag; |
25
|
|
|
|
|
|
|
|
26
|
3
|
|
|
|
|
12
|
return $ok; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub diagnostics |
30
|
|
|
|
|
|
|
{ |
31
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
32
|
2
|
|
|
|
|
5
|
my ($where, $last) = @_; |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
|
|
3
|
my $error = $last->{diag}; |
35
|
2
|
|
|
|
|
7
|
my $data = Test::Deep::render_val($last->{got}); |
36
|
2
|
|
|
|
|
5
|
my $diag = <
|
37
|
|
|
|
|
|
|
Ran coderef at $where on |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
$data |
40
|
|
|
|
|
|
|
EOM |
41
|
2
|
100
|
|
|
|
6
|
if (defined($error)) |
42
|
|
|
|
|
|
|
{ |
43
|
1
|
|
|
|
|
4
|
$diag .= <
|
44
|
|
|
|
|
|
|
and it said |
45
|
|
|
|
|
|
|
$error |
46
|
|
|
|
|
|
|
EOM |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
else |
49
|
|
|
|
|
|
|
{ |
50
|
1
|
|
|
|
|
3
|
$diag .= <
|
51
|
|
|
|
|
|
|
it failed but it didn't say why. |
52
|
|
|
|
|
|
|
EOM |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
2
|
|
|
|
|
5
|
return $diag; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |