line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
13
|
|
|
13
|
|
71
|
#line 1 |
|
13
|
|
|
|
|
23
|
|
|
13
|
|
|
|
|
480
|
|
2
|
13
|
|
|
13
|
|
65
|
use strict; |
|
13
|
|
|
|
|
23
|
|
|
13
|
|
|
|
|
519
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::Stack; |
6
|
13
|
|
|
13
|
|
66
|
|
|
13
|
|
|
|
|
23
|
|
|
13
|
|
|
|
|
647
|
|
7
|
|
|
|
|
|
|
use Carp qw( confess ); |
8
|
13
|
|
|
13
|
|
16561
|
|
|
13
|
|
|
|
|
34
|
|
|
13
|
|
|
|
|
81
|
|
9
|
|
|
|
|
|
|
use Test::Deep::MM qw( new init Stack Arrow ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
71
|
|
|
71
|
0
|
118
|
{ |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
71
|
|
|
|
|
367
|
|
15
|
|
|
|
|
|
|
$self->SUPER::init(@_); |
16
|
71
|
50
|
|
|
|
271
|
|
17
|
|
|
|
|
|
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
568
|
|
|
568
|
0
|
841
|
{ |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
568
|
|
|
|
|
754
|
|
|
568
|
|
|
|
|
1757
|
|
24
|
|
|
|
|
|
|
push(@{$self->getStack}, @_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
568
|
|
|
568
|
0
|
841
|
{ |
29
|
|
|
|
|
|
|
my $self = shift; |
30
|
568
|
|
|
|
|
554
|
|
|
568
|
|
|
|
|
1283
|
|
31
|
|
|
|
|
|
|
return pop @{$self->getStack}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub render |
35
|
0
|
|
|
0
|
0
|
0
|
{ |
36
|
0
|
|
|
|
|
0
|
my $self = shift; |
37
|
|
|
|
|
|
|
my $var = shift; |
38
|
0
|
|
|
|
|
0
|
|
39
|
|
|
|
|
|
|
my $stack = $self->getStack; |
40
|
0
|
|
|
|
|
0
|
|
41
|
|
|
|
|
|
|
$self->setArrow(0); |
42
|
0
|
|
|
|
|
0
|
|
43
|
|
|
|
|
|
|
foreach my $data (@$stack) |
44
|
0
|
|
|
|
|
0
|
{ |
45
|
0
|
0
|
|
|
|
0
|
my $exp = $data->{exp}; |
46
|
|
|
|
|
|
|
if (UNIVERSAL::isa($exp, "Test::Deep::Cmp")) |
47
|
0
|
|
|
|
|
0
|
{ |
48
|
|
|
|
|
|
|
$var = $exp->render_stack($var, $data); |
49
|
0
|
0
|
|
|
|
0
|
|
50
|
|
|
|
|
|
|
$self->setArrow(0) if $exp->reset_arrow; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
else |
53
|
0
|
|
|
|
|
0
|
{ |
54
|
|
|
|
|
|
|
confess "Don't know how to render '$exp'"; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
} |
57
|
0
|
|
|
|
|
0
|
|
58
|
|
|
|
|
|
|
return $var; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub getLast |
62
|
83
|
|
|
83
|
0
|
115
|
{ |
63
|
|
|
|
|
|
|
my $self = shift; |
64
|
83
|
|
|
|
|
235
|
|
65
|
|
|
|
|
|
|
return $self->getStack->[-1]; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub incArrow |
69
|
0
|
|
|
0
|
0
|
|
{ |
70
|
|
|
|
|
|
|
my $self = shift; |
71
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
my $a = $self->getArrow; |
73
|
|
|
|
|
|
|
$self->setArrow($a + 1); |
74
|
0
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
return $a; |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub length |
79
|
0
|
|
|
0
|
0
|
|
{ |
80
|
|
|
|
|
|
|
my $self = shift; |
81
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
return @{$self->getStack} + 0; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |