Index: test/mjsunit/wasm/ffi.js |
diff --git a/test/mjsunit/wasm/ffi.js b/test/mjsunit/wasm/ffi.js |
index 4b503efce43b289fb98adfd19e0e6367121eb26e..58253061055d2dad1e8d5b4b06e07926bbf8d478 100644 |
--- a/test/mjsunit/wasm/ffi.js |
+++ b/test/mjsunit/wasm/ffi.js |
@@ -295,7 +295,7 @@ testCallBinopVoid(kAstF64); |
-function testCallPrint() { |
+(function testCallPrint() { |
ahaas
2016/11/16 10:51:18
All other tests have the style
function name() {}
|
var builder = new WasmModuleBuilder(); |
builder.addImport("print", makeSig_v_x(kAstI32)); |
@@ -311,7 +311,30 @@ function testCallPrint() { |
var main = builder.instantiate({print: print}).exports.main; |
for (var i = -9; i < 900; i += 6.125) main(i); |
-} |
+})(); |
+ |
+ |
+(function testImportNumbers() { |
ahaas
2016/11/16 10:51:18
nits: It's a test, you can give it long descriptiv
|
+ var builder = new WasmModuleBuilder(); |
+ |
+ builder.addImport('0', kSig_v_i); |
-testCallPrint(); |
-testCallPrint(); |
+ builder.instantiate({0: print}); |
+})(); |
+ |
+(function testImportNumbers2() { |
+ var builder = new WasmModuleBuilder(); |
+ |
+ builder.addImportWithModule('foo', '0', kSig_v_i); |
+ builder.addImportWithModule('0', 'foo', kSig_v_i); |
+ builder.addImportWithModule('0', '0', kSig_v_i); |
+ builder.addImportWithModule('18', '-3', kSig_v_i); |
+ builder.addImportWithModule('-3', '18', kSig_v_i); |
+ |
+ builder.instantiate({ |
+ foo: {0: print}, |
+ 0: {0: print, foo: print}, |
+ 18: {'-3': print}, |
+ '-3': {18: print} |
+ }); |
+})(); |