Index: test/mjsunit/wasm/asm-wasm.js |
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js |
index ef5e0f566e82759ef2ae68210f977a31ece1d853..8dfe85aee1a92427926dcda0558d6a010a05ad94 100644 |
--- a/test/mjsunit/wasm/asm-wasm.js |
+++ b/test/mjsunit/wasm/asm-wasm.js |
@@ -757,3 +757,29 @@ function TestNestedSwitch() { |
} |
assertEquals(43, _WASMEXP_.asmCompileRun(TestNestedSwitch.toString())); |
+ |
+function TestInitFunctionWithNoGlobals() { |
+ "use asm"; |
+ function caller() { |
+ return 51; |
+ } |
+ return {caller}; |
+} |
+ |
+var module = _WASMEXP_.instantiateModuleFromAsm( |
+ TestInitFunctionWithNoGlobals.toString()); |
+module.__init__(); |
+assertEquals(51, module.caller()); |
+ |
+function TestExportNameDifferentFromFunctionName() { |
+ "use asm"; |
+ function caller() { |
+ return 55; |
+ } |
+ return {alt_caller:caller}; |
+} |
+ |
+var module = _WASMEXP_.instantiateModuleFromAsm( |
+ TestExportNameDifferentFromFunctionName.toString()); |
+module.__init__(); |
+assertEquals(55, module.alt_caller()); |