summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-09-15 19:24:29 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-09-16 08:25:36 -0700
commita2553af6e5f1db5aac7e0bb23db887f37101de35 (patch)
treededf394f245daae49d795b5c5644cb2fc3ed617c /ext
parent437463ee61bfcc252a038dfbbeb1cf4362532859 (diff)
downloadperl-a2553af6e5f1db5aac7e0bb23db887f37101de35.tar.gz
Tweak B::Concise tests following OPpCONST_FOLDED removal
Diffstat (limited to 'ext')
-rw-r--r--ext/B/t/optree_constants.t49
1 files changed, 31 insertions, 18 deletions
diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t
index 23ce6a3d00..865eed1df0 100644
--- a/ext/B/t/optree_constants.t
+++ b/ext/B/t/optree_constants.t
@@ -209,12 +209,11 @@ my ($expect, $expect_nt) = (<<'EOT_EOT', <<'EONT_EONT');
# 1 <;> nextstate(main 635 optree_constants.t:163) v:>,<,% ->2
# 8 <@> prtf sK ->9
# 2 <0> pushmark sM ->3
-# 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] sM ->4 < 5.017002
+# 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] sM/FOLD ->4
# 4 <$> const[IV 42] sM* ->5 < 5.017002
# 5 <$> const[PV "hithere"] sM* ->6 < 5.017002
# 6 <$> const[NV 1.414213] sM* ->7 < 5.017002
# 7 <$> const[NV 3.14159] sM* ->8 < 5.017002
-# 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] sM/FOLD ->4 >= 5.017002
# 4 <$> const[IV 42] sM*/FOLD ->5 >=5.017002
# 5 <$> const[PV "hithere"] sM*/FOLD ->6 >=5.017002
# 6 <$> const[NV 1.414213] sM*/FOLD ->7 >=5.017002
@@ -225,12 +224,11 @@ EOT_EOT
# 1 <;> nextstate(main 635 optree_constants.t:163) v:>,<,% ->2
# 8 <@> prtf sK ->9
# 2 <0> pushmark sM ->3
-# 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") sM ->4 < 5.017002
+# 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") sM/FOLD ->4
# 4 <$> const(IV 42) sM* ->5 < 5.017002
# 5 <$> const(PV "hithere") sM* ->6 < 5.017002
# 6 <$> const(NV 1.414213) sM* ->7 < 5.017002
# 7 <$> const(NV 3.14159) sM* ->8 < 5.017002
-# 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") sM/FOLD ->4 >= 5.017002
# 4 <$> const(IV 42) sM*/FOLD ->5 >=5.017002
# 5 <$> const(PV "hithere") sM*/FOLD ->6 >=5.017002
# 6 <$> const(NV 1.414213) sM*/FOLD ->7 >=5.017002
@@ -240,6 +238,9 @@ EONT_EONT
if($] < 5.015) {
s/M(?=\*? ->)//g for $expect, $expect_nt;
}
+if($] < 5.017002 || $] >= 5.019004) {
+ s|\\n"[])] sM\K/FOLD|| for $expect, $expect_nt;
+}
checkOptree ( name => 'call many in a print statement',
code => \&printem,
@@ -297,14 +298,16 @@ checkOptree ( name => 'boolean or folding',
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 942 (eval 55):1) v ->2
-# 4 <@> print sK ->5
+# 4 <@> print sK ->5 < 5.019004
+# 4 <@> print sK/FOLD ->5 >=5.019004
# 2 <0> pushmark s ->3
# 3 <$> const[PV "foobar"] s ->4
EOT_EOT
# 5 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->5
# 1 <;> nextstate(main 942 (eval 55):1) v ->2
-# 4 <@> print sK ->5
+# 4 <@> print sK ->5 < 5.019004
+# 4 <@> print sK/FOLD ->5 >=5.019004
# 2 <0> pushmark s ->3
# 3 <$> const(PV "foobar") s ->4
EONT_EONT
@@ -330,29 +333,34 @@ checkOptree ( name => 'lc*,uc*,gt,lt,ge,le,cmp',
# - <1> ex-rv2sv sKRM*/1 ->4
# 3 <#> gvsv[*s] s ->4
# 5 <;> nextstate(main 916 optree_constants.t:308) v:>,<,%,{ ->6
-# 8 <@> print vK ->9
+# 8 <@> print vK ->9 < 5.019004
+# 8 <@> print vK/FOLD ->9 >=5.019004
# 6 <0> pushmark s ->7
# 7 <$> const[PV "a-lt-b"] s ->8
# 9 <;> nextstate(main 916 optree_constants.t:309) v:>,<,%,{ ->a
-# c <@> print vK ->d
+# c <@> print vK ->d < 5.019004
+# c <@> print vK/FOLD ->d >=5.019004
# a <0> pushmark s ->b
# b <$> const[PV "b-gt-a"] s ->c
# d <;> nextstate(main 916 optree_constants.t:310) v:>,<,%,{ ->e
-# g <@> print vK ->h
+# g <@> print vK ->h < 5.019004
+# g <@> print vK/FOLD ->h >=5.019004
# e <0> pushmark s ->f
# f <$> const[PV "a-le-b"] s ->g
# h <;> nextstate(main 916 optree_constants.t:311) v:>,<,%,{ ->i
-# k <@> print vK ->l
+# k <@> print vK ->l < 5.019004
+# k <@> print vK/FOLD ->l >=5.019004
# i <0> pushmark s ->j
# j <$> const[PV "b-ge-a"] s ->k
# l <;> nextstate(main 916 optree_constants.t:312) v:>,<,%,{ ->m
-# o <@> print vK ->p
+# o <@> print vK ->p < 5.019004
+# o <@> print vK/FOLD ->p >=5.019004
# m <0> pushmark s ->n
# n <$> const[PV "b-cmp-a"] s ->o
# p <;> nextstate(main 916 optree_constants.t:313) v:>,<,%,{ ->q
# q <$> const[PVNV 0] s/SHORT ->r < 5.017002
# q <$> const[PVNV 0] s/FOLD,SHORT ->r >=5.017002 < 5.019003
-# q <$> const[SPECIAL sv_no] s/FOLD,SHORT ->r >=5.019003
+# q <$> const[SPECIAL sv_no] s/SHORT,FOLD ->r >=5.019003
EOT_EOT
# r <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->r
@@ -363,28 +371,33 @@ EOT_EOT
# - <1> ex-rv2sv sKRM*/1 ->4
# 3 <$> gvsv(*s) s ->4
# 5 <;> nextstate(main 916 optree_constants.t:308) v:>,<,%,{ ->6
-# 8 <@> print vK ->9
+# 8 <@> print vK ->9 < 5.019004
+# 8 <@> print vK/FOLD ->9 >=5.019004
# 6 <0> pushmark s ->7
# 7 <$> const(PV "a-lt-b") s ->8
# 9 <;> nextstate(main 916 optree_constants.t:309) v:>,<,%,{ ->a
-# c <@> print vK ->d
+# c <@> print vK ->d < 5.019004
+# c <@> print vK/FOLD ->d >=5.019004
# a <0> pushmark s ->b
# b <$> const(PV "b-gt-a") s ->c
# d <;> nextstate(main 916 optree_constants.t:310) v:>,<,%,{ ->e
-# g <@> print vK ->h
+# g <@> print vK ->h < 5.019004
+# g <@> print vK/FOLD ->h >=5.019004
# e <0> pushmark s ->f
# f <$> const(PV "a-le-b") s ->g
# h <;> nextstate(main 916 optree_constants.t:311) v:>,<,%,{ ->i
-# k <@> print vK ->l
+# k <@> print vK ->l < 5.019004
+# k <@> print vK/FOLD ->l >=5.019004
# i <0> pushmark s ->j
# j <$> const(PV "b-ge-a") s ->k
# l <;> nextstate(main 916 optree_constants.t:312) v:>,<,%,{ ->m
-# o <@> print vK ->p
+# o <@> print vK ->p < 5.019004
+# o <@> print vK/FOLD ->p >=5.019004
# m <0> pushmark s ->n
# n <$> const(PV "b-cmp-a") s ->o
# p <;> nextstate(main 916 optree_constants.t:313) v:>,<,%,{ ->q
# q <$> const(SPECIAL sv_no) s/SHORT ->r < 5.017002
-# q <$> const(SPECIAL sv_no) s/FOLD,SHORT ->r >=5.017002
+# q <$> const(SPECIAL sv_no) s/SHORT,FOLD ->r >=5.017002
EONT_EONT
checkOptree ( name => 'mixed constant folding, with explicit braces',