Chromium Code Reviews| Index: test/mjsunit/wasm/export-table.js |
| diff --git a/test/mjsunit/wasm/export-table.js b/test/mjsunit/wasm/export-table.js |
| index a41d85dbc79c9480b745071275fae552a1a1c572..4e6429d688b993782b9486817bbbc26c226539a2 100644 |
| --- a/test/mjsunit/wasm/export-table.js |
| +++ b/test/mjsunit/wasm/export-table.js |
| @@ -72,3 +72,22 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
| assertEquals(kReturnValue, module.exports["0"]()); |
| })(); |
| + |
| +(function testExportNameClash() { |
| + var builder = new WasmModuleBuilder(); |
| + |
| + builder.addFunction("one", kSig_v_v) |
| + .addBody([kExprNop]) |
| + .exportAs("main"); |
| + |
|
ahaas
2016/06/16 09:16:13
nit: Add an additional function in between to make
Clemens Hammacher
2016/06/16 12:16:10
Done.
|
| + builder.addFunction("two", kSig_v_v) |
| + .addBody([kExprNop]) |
| + .exportAs("main"); |
| + |
| + try { |
| + builder.instantiate(); |
| + assertUnreachable("should have thrown an exception"); |
| + } catch (e) { |
| + assertContains("Duplicate export", e.toString()); |
| + } |
| +})(); |