line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
41
|
|
|
41
|
|
68481
|
use strict; |
|
41
|
|
|
|
|
92
|
|
|
41
|
|
|
|
|
1129
|
|
2
|
41
|
|
|
41
|
|
216
|
use warnings; |
|
41
|
|
|
|
|
77
|
|
|
41
|
|
|
|
|
1638
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Cache 1.204; |
5
|
|
|
|
|
|
|
|
6
|
41
|
|
|
41
|
|
16794
|
use Test::Deep::Cache::Simple; |
|
41
|
|
|
|
|
108
|
|
|
41
|
|
|
|
|
13597
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new |
9
|
|
|
|
|
|
|
{ |
10
|
461
|
|
|
461
|
0
|
815
|
my $pkg = shift; |
11
|
|
|
|
|
|
|
|
12
|
461
|
|
|
|
|
825
|
my $self = bless {}, $pkg; |
13
|
|
|
|
|
|
|
|
14
|
461
|
|
|
|
|
1340
|
$self->{expects} = [Test::Deep::Cache::Simple->new]; |
15
|
461
|
|
|
|
|
1051
|
$self->{normal} = [Test::Deep::Cache::Simple->new]; |
16
|
|
|
|
|
|
|
|
17
|
461
|
|
|
|
|
1157
|
$self->local; |
18
|
|
|
|
|
|
|
|
19
|
461
|
|
|
|
|
901
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub add |
23
|
|
|
|
|
|
|
{ |
24
|
1140
|
|
|
1140
|
0
|
1734
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
1140
|
|
|
|
|
1929
|
my $type = $self->type; |
27
|
|
|
|
|
|
|
|
28
|
1140
|
|
|
|
|
2999
|
$self->{$type}->[-1]->add(@_); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub cmp |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
# go through all the caches to see if we know this one |
34
|
|
|
|
|
|
|
|
35
|
1179
|
|
|
1179
|
0
|
1793
|
my $self = shift; |
36
|
|
|
|
|
|
|
|
37
|
1179
|
|
|
|
|
2114
|
my $type = $self->type; |
38
|
|
|
|
|
|
|
|
39
|
1179
|
|
|
|
|
1813
|
foreach my $cache (@{$self->{$type}}) |
|
1179
|
|
|
|
|
2574
|
|
40
|
|
|
|
|
|
|
{ |
41
|
2515
|
100
|
|
|
|
5546
|
return 1 if $cache->cmp(@_); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
1139
|
|
|
|
|
2565
|
return 0 |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub local |
48
|
|
|
|
|
|
|
{ |
49
|
914
|
|
|
914
|
0
|
1351
|
my $self = shift; |
50
|
|
|
|
|
|
|
|
51
|
914
|
|
|
|
|
1628
|
foreach my $type (qw( expects normal )) |
52
|
|
|
|
|
|
|
{ |
53
|
1828
|
|
|
|
|
2411
|
push(@{$self->{$type}}, Test::Deep::Cache::Simple->new); |
|
1828
|
|
|
|
|
4112
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub finish |
58
|
|
|
|
|
|
|
{ |
59
|
453
|
|
|
453
|
0
|
997
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
453
|
|
|
|
|
549
|
my $keep = shift; |
62
|
|
|
|
|
|
|
|
63
|
453
|
|
|
|
|
738
|
foreach my $type (qw( expects normal )) |
64
|
|
|
|
|
|
|
{ |
65
|
906
|
|
|
|
|
1367
|
my $caches = $self->{$type}; |
66
|
|
|
|
|
|
|
|
67
|
906
|
|
|
|
|
1193
|
my $last = pop @$caches; |
68
|
|
|
|
|
|
|
|
69
|
906
|
100
|
|
|
|
2327
|
$caches->[-1]->absorb($last) if $keep; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub type |
74
|
|
|
|
|
|
|
{ |
75
|
2319
|
100
|
|
2319
|
0
|
4662
|
return $Test::Deep::Expects ? "expects" : "normal"; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |