Index: test/mjsunit/wasm/export-table.js |
diff --git a/test/mjsunit/wasm/export-table.js b/test/mjsunit/wasm/export-table.js |
index 9087d32339d545dfa160877629ccedac949d8cc1..2200af5c68f9df3b6c6a88844de1dbdae6fc5990 100644 |
--- a/test/mjsunit/wasm/export-table.js |
+++ b/test/mjsunit/wasm/export-table.js |
@@ -54,6 +54,27 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
assertSame(module.exports.blah, module.exports.foo); |
})(); |
+(function testEmptyName() { |
+ print("TestEmptyName..."); |
+ var kReturnValue = 93; |
+ |
+ var builder = new WasmModuleBuilder(); |
+ |
+ builder.addFunction("main", kSig_i_v) |
+ .addBody([ |
+ kExprI8Const, |
+ kReturnValue, |
+ kExprReturn |
+ ]) |
+ .exportAs(""); |
+ |
+ var module = builder.instantiate(); |
+ |
+ assertEquals("object", typeof module.exports); |
+ assertEquals("function", typeof module.exports[""]); |
+ |
+ assertEquals(kReturnValue, module.exports[""]()); |
+})(); |
(function testNumericName() { |
print("TestNumericName..."); |