Chromium Code Reviews| Index: test/mjsunit/regress/wasm/regression-5863.js |
| diff --git a/test/mjsunit/regress/wasm/regression-5863.js b/test/mjsunit/regress/wasm/regression-5863.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..df9dcbade68604430656f15367c53b21ce2968d1 |
| --- /dev/null |
| +++ b/test/mjsunit/regress/wasm/regression-5863.js |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2017 the V8 project authors. All rights reserved. |
|
titzer
2017/01/20 09:12:02
Can you move this file into test/mjsunit/wasm ?
I
gdeepti
2017/01/20 18:12:10
Moved to test/mjsunit/wasm/instantiate-module-basi
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Flags: --expose-wasm |
| + |
| +load("test/mjsunit/wasm/wasm-constants.js"); |
| +load("test/mjsunit/wasm/wasm-module-builder.js"); |
| + |
| +(function TestIterableExports() { |
| + let builder = new WasmModuleBuilder; |
| + builder.addExport("a", builder.addFunction("", kSig_v_v).addBody([])); |
| + builder.addExport("b", builder.addFunction("", kSig_v_v).addBody([])); |
| + builder.addExport("c", builder.addFunction("", kSig_v_v).addBody([])); |
| + builder.addExport("d", builder.addFunction("", kSig_v_v).addBody([])); |
| + builder.addExport("e", builder.addGlobal(kWasmI32, false)); |
| + |
| + let module = new WebAssembly.Module(builder.toBuffer()); |
| + let instance = new WebAssembly.Instance(module); |
| + |
| + let exports_count = 0; |
| + for (var e in instance.exports) ++exports_count; |
| + |
| + assertEquals(5, exports_count); |
| +})(); |