summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/parser/module-line-0.js
blob: 6f905a10703c19cf0f7fdc71f3125a5a7d3bff5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
load(libdir + "asserts.js");

compileToStencil("", { lineNumber: 1, module: true });
assertThrowsInstanceOf(() => {
  compileToStencil("", { lineNumber: 0, module: true });
}, Error);

compileToStencilXDR("", { lineNumber: 1, module: true });
assertThrowsInstanceOf(() => {
  compileToStencilXDR("", { lineNumber: 0, module: true });
}, Error);

if (helperThreadCount() > 0) {
  offThreadCompileModuleToStencil("", { lineNumber: 1, module: true });
  assertThrowsInstanceOf(() => {
    offThreadCompileModuleToStencil("", { lineNumber: 0, module: true });
  }, Error);
}