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

Unified Diff: test/mjsunit/wasm/test-wasm-module-builder.js

Issue 2591753002: [wasm] Implement correct 2-level namespace for imports. (Closed)
Patch Set: Fix debug tests 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/test-import-export-wrapper.js ('k') | test/mjsunit/wasm/unicode-validation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/test-wasm-module-builder.js
diff --git a/test/mjsunit/wasm/test-wasm-module-builder.js b/test/mjsunit/wasm/test-wasm-module-builder.js
index 30bbe4ac9377a559d51ca42100b9b4e3aa718d07..f673bec32f82a0087b43e5ca639347d8067fd55f 100644
--- a/test/mjsunit/wasm/test-wasm-module-builder.js
+++ b/test/mjsunit/wasm/test-wasm-module-builder.js
@@ -27,13 +27,13 @@ function instantiate(buffer, ffi) {
(function ImportTest() {
let builder = new WasmModuleBuilder();
- var index = builder.addImport("print", makeSig_v_x(kAstI32));
+ var index = builder.addImport("", "print", makeSig_v_x(kAstI32));
builder.addFunction("foo", kSig_v_v)
.addBody([kExprI8Const, 13, kExprCallFunction, index])
.exportAs("main");
var buffer = builder.toBuffer(debug);
- var instance = instantiate(buffer, {print: print});
+ var instance = instantiate(buffer, {"": {print: print}});
print("should print 13! ");
instance.exports.main();
})();
@@ -145,7 +145,7 @@ function instantiate(buffer, ffi) {
(function ImportTestTwoLevel() {
let builder = new WasmModuleBuilder();
- var index = builder.addImportWithModule("mod", "print", makeSig_v_x(kAstI32));
+ var index = builder.addImport("mod", "print", makeSig_v_x(kAstI32));
builder.addFunction("foo", kSig_v_v)
.addBody([kExprI8Const, 19, kExprCallFunction, index])
.exportAs("main");
« no previous file with comments | « test/mjsunit/wasm/test-import-export-wrapper.js ('k') | test/mjsunit/wasm/unicode-validation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698