summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/modules/many-exports.js
blob: 8e32d34fc1779acb54cfb0ea12104ba23ad4a1a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Test many exports.

load(libdir + "dummyModuleResolveHook.js");

const count = 1024;

let s = "";
for (let i = 0; i < count; i++)
    s += "export let e" + i + " = " + (i * i) + ";\n";
let a = moduleRepo['a'] = parseModule(s);

let b = moduleRepo['b'] = parseModule("import * as ns from 'a'");

b.declarationInstantiation();
b.evaluation();

let ns = a.namespace;
for (let i = 0; i < count; i++)
    assertEq(ns["e" + i], i * i);