line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
#line 1 |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::Stack; |
6
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
53
|
|
7
|
|
|
|
|
|
|
use Carp qw( confess ); |
8
|
1
|
|
|
1
|
|
587
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
use Test::Deep::MM qw( new init Stack Arrow ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
6
|
|
|
6
|
0
|
9
|
{ |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
6
|
|
|
|
|
31
|
|
15
|
|
|
|
|
|
|
$self->SUPER::init(@_); |
16
|
6
|
50
|
|
|
|
22
|
|
17
|
|
|
|
|
|
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
50
|
|
|
50
|
0
|
68
|
{ |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
50
|
|
|
|
|
56
|
|
|
50
|
|
|
|
|
137
|
|
24
|
|
|
|
|
|
|
push(@{$self->getStack}, @_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
50
|
|
|
50
|
0
|
61
|
{ |
29
|
|
|
|
|
|
|
my $self = shift; |
30
|
50
|
|
|
|
|
86
|
|
|
50
|
|
|
|
|
120
|
|
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
|
12
|
|
|
12
|
0
|
15
|
{ |
63
|
|
|
|
|
|
|
my $self = shift; |
64
|
12
|
|
|
|
|
37
|
|
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; |