line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
6
|
#line 1 |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
44
|
|
2
|
1
|
|
|
1
|
|
107
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::Stack; |
6
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
7
|
|
|
|
|
|
|
use Carp qw( confess ); |
8
|
1
|
|
|
1
|
|
709
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
use Test::Deep::MM qw( new init Stack Arrow ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
14
|
|
|
14
|
0
|
18
|
{ |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
14
|
|
|
|
|
42
|
|
15
|
|
|
|
|
|
|
$self->SUPER::init(@_); |
16
|
14
|
50
|
|
|
|
36
|
|
17
|
|
|
|
|
|
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
46
|
|
|
46
|
0
|
51
|
{ |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
46
|
|
|
|
|
50
|
|
|
46
|
|
|
|
|
104
|
|
24
|
|
|
|
|
|
|
push(@{$self->getStack}, @_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
38
|
|
|
38
|
0
|
45
|
{ |
29
|
|
|
|
|
|
|
my $self = shift; |
30
|
38
|
|
|
|
|
37
|
|
|
38
|
|
|
|
|
79
|
|
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
|
16
|
|
|
16
|
0
|
18
|
{ |
63
|
|
|
|
|
|
|
my $self = shift; |
64
|
16
|
|
|
|
|
39
|
|
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; |