Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: test/mjsunit/wasm/export-table.js

Issue 2584843002: Implement LinkError; import tweaks (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/wasm/errors.js ('k') | test/mjsunit/wasm/globals.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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...");
« no previous file with comments | « test/mjsunit/wasm/errors.js ('k') | test/mjsunit/wasm/globals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698