Verified Commit 7038b4bc authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Added a few output tests for existing functionality

parent 99193211
...@@ -2768,6 +2768,26 @@ try { ...@@ -2768,6 +2768,26 @@ try {
}; };
})();") })();")
(test-ps-js declare-special-let-scope
(block nil
(let ((*foo* 123))
(declare (special *foo*))
(blah))
(let ((*foo* 456))
(+ 4 5)))
"(function () {
var FOO_TMPSTACK1;
try {
FOO_TMPSTACK1 = FOO;
FOO = 123;
blah();
} finally {
FOO = FOO_TMPSTACK1;
};
var FOO = 456;
return 4 + 5;
})();")
(test-ps-js declare-special-let* (test-ps-js declare-special-let*
(let* ((*foo* 123) (*bar* (+ *foo* *bar*))) (let* ((*foo* 123) (*bar* (+ *foo* *bar*)))
(declare (special *foo* *bar*)) (declare (special *foo* *bar*))
...@@ -3041,6 +3061,10 @@ return x(); ...@@ -3041,6 +3061,10 @@ return x();
#(1 2 3) #(1 2 3)
"[1, 2, 3];") "[1, 2, 3];")
(test-ps-js vector-literal1
#(1 2 #(a b) 3)
"[1, 2, ['a', 'b'], 3];")
(test-ps-js rem1 (test-ps-js rem1
(+ 1 (rem 2 (+ 3 4))) (+ 1 (rem 2 (+ 3 4)))
"1 + 2 % (3 + 4);") "1 + 2 % (3 + 4);")
...@@ -3935,6 +3959,10 @@ for (var i = 0; i < 5; i += 1) { ...@@ -3935,6 +3959,10 @@ for (var i = 0; i < 5; i += 1) {
return 2 * Math.log(Math.sqrt((x1 + 1) / 2) + Math.sqrt((x1 - 1) / 2)); return 2 * Math.log(Math.sqrt((x1 + 1) / 2) + Math.sqrt((x1 - 1) / 2));
})();") })();")
(test-ps-js double-negation
(or (not foo) (not (not foo)) (not (not (not foo))))
"!foo || foo || !foo;")
;;; broken ;;; broken
;; (test-ps-js let-defun-toplevel ;; (test-ps-js let-defun-toplevel
......
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