Verified Commit 9b9177f9 authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Added tests for new multiple value functionality

parent 4660ac20
...@@ -1050,28 +1050,43 @@ ...@@ -1050,28 +1050,43 @@
t t
:js-target-version "1.8.5") :js-target-version "1.8.5")
;;; Multiple value cases that are currently unimplemented (test-js-eval multiple-value-bind-values
(multiple-value-bind (x y)
;; (test-js-eval multiple-value-call-twice (values 1 2)
;; (progn y)
;; (defun foo (x &optional y z) 2)
;; (if z
;; (values x y z) (test-js-eval multiple-value-passthrough
;; (values x y))) (progn
(defun foo ()
;; (defun bar () (values 1 2))
;; (foo 1 2 3) (defun bar ()
;; (foo 4 5)) (foo))
(multiple-value-bind (x y)
;; (multiple-value-bind (a b c) (bar) (bar)
;; (list a b c))) y))
;; '(4 5 :undefined)) 2)
;; (test-js-eval multiple-value-bind-nested (test-js-eval multiple-value-call-twice
;; (multiple-value-bind (x y) (progn
;; ((lambda () (defun foo (x &optional y z)
;; (multiple-value-bind (a b) (if z
;; (values 1 2) (values x y z)
;; (values b a)))) (values x y)))
;; (list x y))
;; '(2 1)) (defun bar ()
(foo 1 2 3)
(foo 4 5))
(multiple-value-bind (a b c) (bar)
(list a b c)))
'(4 5 :undefined))
(test-js-eval multiple-value-bind-nested
(multiple-value-bind (x y)
((lambda ()
(multiple-value-bind (a b)
(values 1 2)
(values b a))))
(list x y))
'(2 1))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment