line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
41
|
|
|
41
|
|
70845
|
use strict; |
|
41
|
|
|
|
|
97
|
|
|
41
|
|
|
|
|
1122
|
|
2
|
41
|
|
|
41
|
|
222
|
use warnings; |
|
41
|
|
|
|
|
70
|
|
|
41
|
|
|
|
|
1641
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Cache 1.203; |
5
|
|
|
|
|
|
|
|
6
|
41
|
|
|
41
|
|
16989
|
use Test::Deep::Cache::Simple; |
|
41
|
|
|
|
|
110
|
|
|
41
|
|
|
|
|
13852
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new |
9
|
|
|
|
|
|
|
{ |
10
|
456
|
|
|
456
|
0
|
874
|
my $pkg = shift; |
11
|
|
|
|
|
|
|
|
12
|
456
|
|
|
|
|
788
|
my $self = bless {}, $pkg; |
13
|
|
|
|
|
|
|
|
14
|
456
|
|
|
|
|
1296
|
$self->{expects} = [Test::Deep::Cache::Simple->new]; |
15
|
456
|
|
|
|
|
1043
|
$self->{normal} = [Test::Deep::Cache::Simple->new]; |
16
|
|
|
|
|
|
|
|
17
|
456
|
|
|
|
|
1130
|
$self->local; |
18
|
|
|
|
|
|
|
|
19
|
456
|
|
|
|
|
893
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub add |
23
|
|
|
|
|
|
|
{ |
24
|
1138
|
|
|
1138
|
0
|
1747
|
my $self = shift; |
25
|
|
|
|
|
|
|
|
26
|
1138
|
|
|
|
|
1921
|
my $type = $self->type; |
27
|
|
|
|
|
|
|
|
28
|
1138
|
|
|
|
|
2939
|
$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
|
1177
|
|
|
1177
|
0
|
1744
|
my $self = shift; |
36
|
|
|
|
|
|
|
|
37
|
1177
|
|
|
|
|
2032
|
my $type = $self->type; |
38
|
|
|
|
|
|
|
|
39
|
1177
|
|
|
|
|
1701
|
foreach my $cache (@{$self->{$type}}) |
|
1177
|
|
|
|
|
2843
|
|
40
|
|
|
|
|
|
|
{ |
41
|
2509
|
100
|
|
|
|
5461
|
return 1 if $cache->cmp(@_); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
1137
|
|
|
|
|
2582
|
return 0 |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub local |
48
|
|
|
|
|
|
|
{ |
49
|
889
|
|
|
889
|
0
|
1300
|
my $self = shift; |
50
|
|
|
|
|
|
|
|
51
|
889
|
|
|
|
|
1570
|
foreach my $type (qw( expects normal )) |
52
|
|
|
|
|
|
|
{ |
53
|
1778
|
|
|
|
|
2207
|
push(@{$self->{$type}}, Test::Deep::Cache::Simple->new); |
|
1778
|
|
|
|
|
4042
|
|
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub finish |
58
|
|
|
|
|
|
|
{ |
59
|
433
|
|
|
433
|
0
|
587
|
my $self = shift; |
60
|
|
|
|
|
|
|
|
61
|
433
|
|
|
|
|
539
|
my $keep = shift; |
62
|
|
|
|
|
|
|
|
63
|
433
|
|
|
|
|
724
|
foreach my $type (qw( expects normal )) |
64
|
|
|
|
|
|
|
{ |
65
|
866
|
|
|
|
|
1329
|
my $caches = $self->{$type}; |
66
|
|
|
|
|
|
|
|
67
|
866
|
|
|
|
|
1151
|
my $last = pop @$caches; |
68
|
|
|
|
|
|
|
|
69
|
866
|
100
|
|
|
|
2211
|
$caches->[-1]->absorb($last) if $keep; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub type |
74
|
|
|
|
|
|
|
{ |
75
|
2315
|
100
|
|
2315
|
0
|
4977
|
return $Test::Deep::Expects ? "expects" : "normal"; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
1; |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
__END__ |