mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
Adapt peval.test to recent associativity fixes of numeric ops.
* test-suite/tests/peval.test ("partial evaluation"): Adapt tests to the fact that arithmetic operators are now expanded into binary ops with left-to-right associativity.
This commit is contained in:
parent
79a6c3be6a
commit
f499d6e31a
1 changed files with 9 additions and 12 deletions
|
@ -345,22 +345,19 @@
|
||||||
(f -1 y)
|
(f -1 y)
|
||||||
(f 2 y)
|
(f 2 y)
|
||||||
(f z y)))
|
(f z y)))
|
||||||
|
(primcall
|
||||||
|
+
|
||||||
|
(primcall
|
||||||
|
+
|
||||||
(primcall
|
(primcall
|
||||||
+
|
+
|
||||||
(const -1) ; (f -1 0)
|
(const -1) ; (f -1 0)
|
||||||
(primcall
|
(seq (toplevel y) (const -1))) ; (f -1 y)
|
||||||
+
|
(toplevel y)) ; (f 2 y)
|
||||||
(const 0) ; (f 1 0)
|
|
||||||
(primcall
|
|
||||||
+
|
|
||||||
(seq (toplevel y) (const -1)) ; (f -1 y)
|
|
||||||
(primcall
|
|
||||||
+
|
|
||||||
(toplevel y) ; (f 2 y)
|
|
||||||
(let (x y) (_ _) ((toplevel z) (toplevel y)) ; (f z y)
|
(let (x y) (_ _) ((toplevel z) (toplevel y)) ; (f z y)
|
||||||
(if (primcall > (lexical x _) (const 0))
|
(if (primcall > (lexical x _) (const 0))
|
||||||
(lexical y _)
|
(lexical y _)
|
||||||
(lexical x _))))))))
|
(lexical x _)))))
|
||||||
|
|
||||||
(pass-if-peval
|
(pass-if-peval
|
||||||
;; First order, conditional.
|
;; First order, conditional.
|
||||||
|
@ -614,8 +611,8 @@
|
||||||
(call (toplevel display) (const chbouib))))
|
(call (toplevel display) (const chbouib))))
|
||||||
(let (y) (_) ((primcall * (lexical x _) (const 2)))
|
(let (y) (_) ((primcall * (lexical x _) (const 2)))
|
||||||
(primcall +
|
(primcall +
|
||||||
(lexical x _)
|
(primcall + (lexical x _) (lexical x _))
|
||||||
(primcall + (lexical x _) (lexical y _))))))
|
(lexical y _)))))
|
||||||
|
|
||||||
(pass-if-peval
|
(pass-if-peval
|
||||||
;; Non-constant arguments not propagated to lambdas.
|
;; Non-constant arguments not propagated to lambdas.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue