Verified Commit 99193211 authored by Vladimir Sedach's avatar Vladimir Sedach
Browse files

Removed explicit return-from in CASE tests

parent e7ee64b9
...@@ -2277,10 +2277,9 @@ return foo(1, 'y', 2); ...@@ -2277,10 +2277,9 @@ return foo(1, 'y', 2);
(test-ps-js return-case-break-elimination (test-ps-js return-case-break-elimination
(defun foo () (defun foo ()
(return-from foo (case 1
(case 1 (0 1)
(0 1) (otherwise 2)))
(otherwise 2))))
"function foo() { "function foo() {
switch (1) { switch (1) {
case 0: case 0:
...@@ -2300,11 +2299,10 @@ return foo(1, 'y', 2); ...@@ -2300,11 +2299,10 @@ return foo(1, 'y', 2);
(test-ps-js switch-return-fallthrough (test-ps-js switch-return-fallthrough
(defun foo () (defun foo ()
(return-from foo (switch x
(switch x (1 (foo) break)
(1 (foo) break) (2 (bar))
(2 (bar)) (default 4)))
(default 4))))
"function foo() { "function foo() {
switch (x) { switch (x) {
case 1: case 1:
...@@ -2318,10 +2316,9 @@ return foo(1, 'y', 2); ...@@ -2318,10 +2316,9 @@ return foo(1, 'y', 2);
(test-ps-js return-last-case (test-ps-js return-last-case
(defun foo () (defun foo ()
(return-from foo (case x
(case x (:a 'eh)
(:a 'eh) (:b 'bee)))
(:b 'bee))))
"function foo() { "function foo() {
switch (x) { switch (x) {
case 'a': case 'a':
...@@ -2333,11 +2330,10 @@ return foo(1, 'y', 2); ...@@ -2333,11 +2330,10 @@ return foo(1, 'y', 2);
(test-ps-js return-macrolet (test-ps-js return-macrolet
(defun foo () (defun foo ()
(return-from foo (macrolet ((x () 1))
(macrolet ((x () 1)) (case (x)
(case (x) (:a 'eh)
(:a 'eh) (:b 'bee))))
(:b 'bee)))))
"function foo() { "function foo() {
switch (1) { switch (1) {
case 'a': case 'a':
......
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