line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
16
|
|
|
16
|
|
76
|
#line 1 |
|
16
|
|
|
|
|
33
|
|
|
16
|
|
|
|
|
436
|
|
2
|
16
|
|
|
16
|
|
78
|
use strict; |
|
16
|
|
|
|
|
31
|
|
|
16
|
|
|
|
|
496
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::Cache; |
6
|
16
|
|
|
16
|
|
9200
|
|
|
16
|
|
|
|
|
44
|
|
|
16
|
|
|
|
|
5760
|
|
7
|
|
|
|
|
|
|
use Test::Deep::Cache::Simple; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new |
10
|
67
|
|
|
67
|
0
|
115
|
{ |
11
|
|
|
|
|
|
|
my $pkg = shift; |
12
|
67
|
|
|
|
|
249
|
|
13
|
|
|
|
|
|
|
my $self = bless {}, $pkg; |
14
|
67
|
|
|
|
|
1352
|
|
15
|
67
|
|
|
|
|
254
|
$self->{expects} = [Test::Deep::Cache::Simple->new]; |
16
|
|
|
|
|
|
|
$self->{normal} = [Test::Deep::Cache::Simple->new]; |
17
|
67
|
|
|
|
|
242
|
|
18
|
|
|
|
|
|
|
$self->local; |
19
|
67
|
|
|
|
|
212
|
|
20
|
|
|
|
|
|
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub add |
24
|
402
|
|
|
402
|
0
|
511
|
{ |
25
|
|
|
|
|
|
|
my $self = shift; |
26
|
402
|
|
|
|
|
3312
|
|
27
|
|
|
|
|
|
|
my $type = $self->type; |
28
|
402
|
|
|
|
|
1553
|
|
29
|
|
|
|
|
|
|
$self->{$type}->[-1]->add(@_); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub cmp |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
# go through all the caches to see if we know this one |
35
|
402
|
|
|
402
|
0
|
496
|
|
36
|
|
|
|
|
|
|
my $self = shift; |
37
|
402
|
|
|
|
|
806
|
|
38
|
|
|
|
|
|
|
my $type = $self->type; |
39
|
402
|
|
|
|
|
493
|
|
|
402
|
|
|
|
|
1140
|
|
40
|
|
|
|
|
|
|
foreach my $cache (@{$self->{$type}}) |
41
|
804
|
50
|
|
|
|
3575
|
{ |
42
|
|
|
|
|
|
|
return 1 if $cache->cmp(@_); |
43
|
|
|
|
|
|
|
} |
44
|
402
|
|
|
|
|
1225
|
|
45
|
|
|
|
|
|
|
return 0 |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub local |
49
|
67
|
|
|
67
|
0
|
98
|
{ |
50
|
|
|
|
|
|
|
my $self = shift; |
51
|
67
|
|
|
|
|
167
|
|
52
|
|
|
|
|
|
|
foreach my $type (qw( expects normal )) |
53
|
134
|
|
|
|
|
456
|
{ |
|
134
|
|
|
|
|
473
|
|
54
|
|
|
|
|
|
|
push(@{$self->{$type}}, Test::Deep::Cache::Simple->new); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub finish |
59
|
0
|
|
|
0
|
0
|
0
|
{ |
60
|
|
|
|
|
|
|
my $self = shift; |
61
|
0
|
|
|
|
|
0
|
|
62
|
|
|
|
|
|
|
my $keep = shift; |
63
|
0
|
|
|
|
|
0
|
|
64
|
|
|
|
|
|
|
foreach my $type (qw( expects normal )) |
65
|
0
|
|
|
|
|
0
|
{ |
66
|
|
|
|
|
|
|
my $caches = $self->{$type}; |
67
|
0
|
|
|
|
|
0
|
|
68
|
|
|
|
|
|
|
my $last = pop @$caches; |
69
|
0
|
0
|
|
|
|
0
|
|
70
|
|
|
|
|
|
|
$caches->[-1]->absorb($last) if $keep; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub type |
75
|
804
|
50
|
|
804
|
0
|
1884
|
{ |
76
|
|
|
|
|
|
|
return $Test::Deep::Expects ? "expects" : "normal"; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |