line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
16
|
|
|
16
|
|
78
|
#line 1 |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
467
|
|
2
|
16
|
|
|
16
|
|
76
|
use strict; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
530
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::Stack; |
6
|
16
|
|
|
16
|
|
75
|
|
|
16
|
|
|
|
|
27
|
|
|
16
|
|
|
|
|
718
|
|
7
|
|
|
|
|
|
|
use Carp qw( confess ); |
8
|
16
|
|
|
16
|
|
17929
|
|
|
16
|
|
|
|
|
43
|
|
|
16
|
|
|
|
|
95
|
|
9
|
|
|
|
|
|
|
use Test::Deep::MM qw( new init Stack Arrow ); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init |
12
|
67
|
|
|
67
|
0
|
108
|
{ |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
67
|
|
|
|
|
359
|
|
15
|
|
|
|
|
|
|
$self->SUPER::init(@_); |
16
|
67
|
50
|
|
|
|
297
|
|
17
|
|
|
|
|
|
|
$self->setStack([]) unless $self->getStack; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub push |
21
|
709
|
|
|
709
|
0
|
876
|
{ |
22
|
|
|
|
|
|
|
my $self = shift; |
23
|
709
|
|
|
|
|
731
|
|
|
709
|
|
|
|
|
1744
|
|
24
|
|
|
|
|
|
|
push(@{$self->getStack}, @_); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub pop |
28
|
709
|
|
|
709
|
0
|
819
|
{ |
29
|
|
|
|
|
|
|
my $self = shift; |
30
|
709
|
|
|
|
|
682
|
|
|
709
|
|
|
|
|
1567
|
|
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
|
201
|
|
|
201
|
0
|
278
|
{ |
63
|
|
|
|
|
|
|
my $self = shift; |
64
|
201
|
|
|
|
|
486
|
|
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; |