| Index: test/mjsunit/wasm/export-table.js
|
| diff --git a/test/mjsunit/wasm/export-table.js b/test/mjsunit/wasm/export-table.js
|
| index 2200af5c68f9df3b6c6a88844de1dbdae6fc5990..f715b20f1f049b33f19046624c4c0ed0c2bc1190 100644
|
| --- a/test/mjsunit/wasm/export-table.js
|
| +++ b/test/mjsunit/wasm/export-table.js
|
| @@ -133,3 +133,44 @@ load("test/mjsunit/wasm/wasm-module-builder.js");
|
| assertSame(e.a, e.c);
|
| assertEquals(String(f.index), e.a.name);
|
| })();
|
| +
|
| +
|
| +(function testReexportJSMultipleIdentity() {
|
| + print("TestReexportMultipleIdentity...");
|
| + var builder = new WasmModuleBuilder();
|
| +
|
| + function js() {}
|
| +
|
| + var a = builder.addImport("a", kSig_v_v);
|
| + builder.addExport("f", a);
|
| + builder.addExport("g", a);
|
| +
|
| + let instance = builder.instantiate({a: js});
|
| + let e = instance.exports;
|
| + assertEquals("function", typeof e.f);
|
| + assertEquals("function", typeof e.g);
|
| + assertFalse(e.f == js);
|
| + assertFalse(e.g == js);
|
| + assertTrue(e.f == e.g);
|
| +})();
|
| +
|
| +
|
| +(function testReexportJSMultiple() {
|
| + print("TestReexportMultiple...");
|
| + var builder = new WasmModuleBuilder();
|
| +
|
| + function js() {}
|
| +
|
| + var a = builder.addImport("a", kSig_v_v);
|
| + var b = builder.addImport("b", kSig_v_v);
|
| + builder.addExport("f", a);
|
| + builder.addExport("g", b);
|
| +
|
| + let instance = builder.instantiate({a: js, b: js});
|
| + let e = instance.exports;
|
| + assertEquals("function", typeof e.f);
|
| + assertEquals("function", typeof e.g);
|
| + assertFalse(e.f == js);
|
| + assertFalse(e.g == js);
|
| + assertFalse(e.f == e.g);
|
| +})();
|
|
|