line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
9
|
#line 1 |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
2
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
64
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::Stack; |
6
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
98
|
|
7
|
|
|
|
|
|
|
use Carp qw( confess ); |
8
|
2
|
|
|
2
|
|
1004
|
|
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
11
|
|
9
|
|
|
|
|
|
|
use Test::Deep::MM qw( new init Stack Arrow ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
47
|
|
|
47
|
0
|
69
|
{ |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
47
|
|
|
|
|
170
|
|
15
|
|
|
|
|
|
|
$self->SUPER::init(@_); |
16
|
47
|
50
|
|
|
|
142
|
|
17
|
|
|
|
|
|
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
614
|
|
|
614
|
0
|
740
|
{ |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
614
|
|
|
|
|
745
|
|
|
614
|
|
|
|
|
1364
|
|
24
|
|
|
|
|
|
|
push(@{$self->getStack}, @_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
614
|
|
|
614
|
0
|
613
|
{ |
29
|
|
|
|
|
|
|
my $self = shift; |
30
|
614
|
|
|
|
|
539
|
|
|
614
|
|
|
|
|
1249
|
|
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
|
151
|
|
|
151
|
0
|
135
|
{ |
63
|
|
|
|
|
|
|
my $self = shift; |
64
|
151
|
|
|
|
|
347
|
|
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; |