Index: test/mjsunit/wasm/asm-wasm-switch.js |
diff --git a/test/mjsunit/wasm/asm-wasm-switch.js b/test/mjsunit/wasm/asm-wasm-switch.js |
index b0c01b7d884aaa2d84e57539ff123cca1836be1b..bbdb1a20f37fe1eb684dce88dc98e526577f82c4 100644 |
--- a/test/mjsunit/wasm/asm-wasm-switch.js |
+++ b/test/mjsunit/wasm/asm-wasm-switch.js |
@@ -4,6 +4,32 @@ |
// Flags: --expose-wasm |
+(function TestSwitch0() { |
+ function asmModule() { |
+ "use asm" |
+ |
+ function caller() { |
+ var ret = 0; |
+ var x = 7; |
+ switch (x) { |
+ case 1: { |
+ return 0; |
+ } |
+ case 7: { |
+ ret = 5; |
+ break; |
+ } |
+ default: return 0; |
+ } |
+ return ret|0; |
+ } |
+ |
+ return {caller:caller}; |
+ } |
+ var wasm = Wasm.instantiateModuleFromAsm(asmModule.toString()); |
+ assertEquals(5, wasm.caller()); |
+})(); |
+ |
(function TestSwitch() { |
function asmModule() { |
"use asm" |