mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 22:15:24 +02:00
Merge branch 'bocoup/module-code'
This commit is contained in:
commit
b35b39c4aa
24
test/language/eval-code/export.js
Normal file
24
test/language/eval-code/export.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: The `export` declaration may not appear within eval code
|
||||||
|
id: sec-scripts
|
||||||
|
flags: [module]
|
||||||
|
info: |
|
||||||
|
Eval code is the source text supplied to the built-in eval function. More
|
||||||
|
precisely, if the parameter to the built-in eval function is a String, it
|
||||||
|
is treated as an ECMAScript Script. The eval code for a particular
|
||||||
|
invocation of eval is the global code portion of that Script.
|
||||||
|
|
||||||
|
A.5 Scripts and Modules
|
||||||
|
|
||||||
|
Script:
|
||||||
|
ScriptBodyopt
|
||||||
|
|
||||||
|
ScriptBody:
|
||||||
|
StatementList
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(SyntaxError, function() {
|
||||||
|
eval('export default null;');
|
||||||
|
});
|
24
test/language/eval-code/import.js
Normal file
24
test/language/eval-code/import.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: The `import` declaration may not appear within eval code
|
||||||
|
id: sec-scripts
|
||||||
|
flags: [module]
|
||||||
|
info: |
|
||||||
|
Eval code is the source text supplied to the built-in eval function. More
|
||||||
|
precisely, if the parameter to the built-in eval function is a String, it
|
||||||
|
is treated as an ECMAScript Script. The eval code for a particular
|
||||||
|
invocation of eval is the global code portion of that Script.
|
||||||
|
|
||||||
|
A.5 Scripts and Modules
|
||||||
|
|
||||||
|
Script:
|
||||||
|
ScriptBodyopt
|
||||||
|
|
||||||
|
ScriptBody:
|
||||||
|
StatementList
|
||||||
|
---*/
|
||||||
|
|
||||||
|
assert.throws(SyntaxError, function() {
|
||||||
|
eval('import v from "./import.js";');
|
||||||
|
});
|
17
test/language/global-code/export.js
Normal file
17
test/language/global-code/export.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: The `export` declaration may not appear within a ScriptBody
|
||||||
|
id: sec-scripts
|
||||||
|
negative: SyntaxError
|
||||||
|
info: |
|
||||||
|
A.5 Scripts and Modules
|
||||||
|
|
||||||
|
Script:
|
||||||
|
ScriptBodyopt
|
||||||
|
|
||||||
|
ScriptBody:
|
||||||
|
StatementList
|
||||||
|
---*/
|
||||||
|
|
||||||
|
export default null;
|
17
test/language/global-code/import.js
Normal file
17
test/language/global-code/import.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: The `import` declaration may not appear within a ScriptBody
|
||||||
|
id: sec-scripts
|
||||||
|
negative: SyntaxError
|
||||||
|
info: |
|
||||||
|
A.5 Scripts and Modules
|
||||||
|
|
||||||
|
Script:
|
||||||
|
ScriptBodyopt
|
||||||
|
|
||||||
|
ScriptBody:
|
||||||
|
StatementList
|
||||||
|
---*/
|
||||||
|
|
||||||
|
import v from './import.js';
|
10
test/language/module-code/decl-pos-export-arrow-function.js
Normal file
10
test/language/module-code/decl-pos-export-arrow-function.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
() => { export default null; };
|
10
test/language/module-code/decl-pos-export-block-stmt-list.js
Normal file
10
test/language/module-code/decl-pos-export-block-stmt-list.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
{ void 0; export default null; }
|
10
test/language/module-code/decl-pos-export-block-stmt.js
Normal file
10
test/language/module-code/decl-pos-export-block-stmt.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
{ export default null; }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { static method() { export default null; } }
|
10
test/language/module-code/decl-pos-export-class-decl-meth.js
Normal file
10
test/language/module-code/decl-pos-export-class-decl-meth.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { method() { export default null; } }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { static *method() { export default null; } }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { *method() { export default null; } }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { static *method() { export default null; } });
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { *method() { export default null; } });
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { static method() { export default null; } });
|
10
test/language/module-code/decl-pos-export-class-expr-meth.js
Normal file
10
test/language/module-code/decl-pos-export-class-expr-meth.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { method() { export default null; } });
|
10
test/language/module-code/decl-pos-export-do-while.js
Normal file
10
test/language/module-code/decl-pos-export-do-while.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
do export default null; while (false)
|
11
test/language/module-code/decl-pos-export-for-const.js
Normal file
11
test/language/module-code/decl-pos-export-for-const.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (const x = 0; false;)
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-in-const.js
Normal file
11
test/language/module-code/decl-pos-export-for-in-const.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (const y in [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-in-let.js
Normal file
11
test/language/module-code/decl-pos-export-for-in-let.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (let y in [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-in-lhs.js
Normal file
11
test/language/module-code/decl-pos-export-for-in-lhs.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (y in [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-in-var.js
Normal file
11
test/language/module-code/decl-pos-export-for-in-var.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (var y in [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-let.js
Normal file
11
test/language/module-code/decl-pos-export-for-let.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (let x = 0; false;)
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-lhs.js
Normal file
11
test/language/module-code/decl-pos-export-for-lhs.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (x = 0; false;)
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-of-const.js
Normal file
11
test/language/module-code/decl-pos-export-for-of-const.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (const y of [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-of-let.js
Normal file
11
test/language/module-code/decl-pos-export-for-of-let.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (let y of [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-of-lhs.js
Normal file
11
test/language/module-code/decl-pos-export-for-of-lhs.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (y of [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-of-var.js
Normal file
11
test/language/module-code/decl-pos-export-for-of-var.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (var y of [])
|
||||||
|
export default null;
|
11
test/language/module-code/decl-pos-export-for-var.js
Normal file
11
test/language/module-code/decl-pos-export-for-var.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (var x = 0; false;)
|
||||||
|
export default null;
|
10
test/language/module-code/decl-pos-export-function-decl.js
Normal file
10
test/language/module-code/decl-pos-export-function-decl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
function f() { export default null; }
|
10
test/language/module-code/decl-pos-export-function-expr.js
Normal file
10
test/language/module-code/decl-pos-export-function-expr.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(function() { export default null; });
|
10
test/language/module-code/decl-pos-export-generator-decl.js
Normal file
10
test/language/module-code/decl-pos-export-generator-decl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
function* g() { export default null; }
|
10
test/language/module-code/decl-pos-export-generator-expr.js
Normal file
10
test/language/module-code/decl-pos-export-generator-expr.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(function*() { export default null; });
|
10
test/language/module-code/decl-pos-export-if-else.js
Normal file
10
test/language/module-code/decl-pos-export-if-else.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
if (true) { } else export default null;
|
10
test/language/module-code/decl-pos-export-if-if.js
Normal file
10
test/language/module-code/decl-pos-export-if-if.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
if (false) export default null;
|
10
test/language/module-code/decl-pos-export-labeled.js
Normal file
10
test/language/module-code/decl-pos-export-labeled.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
test262: export default null;
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ *m() { export default null; } });
|
10
test/language/module-code/decl-pos-export-object-getter.js
Normal file
10
test/language/module-code/decl-pos-export-object-getter.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ get m() { export default null; } });
|
10
test/language/module-code/decl-pos-export-object-method.js
Normal file
10
test/language/module-code/decl-pos-export-object-method.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ m() { export default null; } });
|
10
test/language/module-code/decl-pos-export-object-setter.js
Normal file
10
test/language/module-code/decl-pos-export-object-setter.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ set m(x) { export default null; } });
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
switch(0) { case 1: export default null; default: }
|
10
test/language/module-code/decl-pos-export-switch-case.js
Normal file
10
test/language/module-code/decl-pos-export-switch-case.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
switch(0) { case 1: export default null; }
|
10
test/language/module-code/decl-pos-export-switch-dftl.js
Normal file
10
test/language/module-code/decl-pos-export-switch-dftl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
switch(0) { default: export default null; }
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try { } catch (err) { } finally {
|
||||||
|
export default null;
|
||||||
|
}
|
12
test/language/module-code/decl-pos-export-try-catch.js
Normal file
12
test/language/module-code/decl-pos-export-try-catch.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try { } catch (err) {
|
||||||
|
export default null;
|
||||||
|
}
|
12
test/language/module-code/decl-pos-export-try-finally.js
Normal file
12
test/language/module-code/decl-pos-export-try-finally.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try { } finally {
|
||||||
|
export default null;
|
||||||
|
}
|
12
test/language/module-code/decl-pos-export-try-try.js
Normal file
12
test/language/module-code/decl-pos-export-try-try.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
export default null;
|
||||||
|
} catch (err) { }
|
10
test/language/module-code/decl-pos-export-while.js
Normal file
10
test/language/module-code/decl-pos-export-while.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `export` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
while (false) export default null;
|
10
test/language/module-code/decl-pos-import-arrow-function.js
Normal file
10
test/language/module-code/decl-pos-import-arrow-function.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
() => { import v from './decl-pos-import-arrow-function.js'; };
|
10
test/language/module-code/decl-pos-import-block-stmt-list.js
Normal file
10
test/language/module-code/decl-pos-import-block-stmt-list.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
{ void 0; import v from './decl-pos-import-block-stmt-list.js'; }
|
10
test/language/module-code/decl-pos-import-block-stmt.js
Normal file
10
test/language/module-code/decl-pos-import-block-stmt.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
{ import v from './decl-pos-import-block-stmt.js'; }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { static method() { import v from './decl-pos-import-class-decl-meth-static.js'; } }
|
10
test/language/module-code/decl-pos-import-class-decl-meth.js
Normal file
10
test/language/module-code/decl-pos-import-class-decl-meth.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { method() { import v from './decl-pos-import-class-decl-meth.js'; } }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { static *method() { import v from './decl-pos-import-class-decl-method-gen-static.js'; } }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
class C { *method() { import v from './decl-pos-import-class-decl-method-gen.js'; } }
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { static *method() { import v from './decl-pos-import-class-expr-meth-gen-static.js'; } });
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { *method() { import v from './decl-pos-import-class-expr-meth-gen.js'; } });
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { static method() { import v from './decl-pos-import-class-expr-meth-static.js'; } });
|
10
test/language/module-code/decl-pos-import-class-expr-meth.js
Normal file
10
test/language/module-code/decl-pos-import-class-expr-meth.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(class { method() { import v from './decl-pos-import-class-expr-meth.js'; } });
|
10
test/language/module-code/decl-pos-import-do-while.js
Normal file
10
test/language/module-code/decl-pos-import-do-while.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
do import v from './decl-pos-import-do-while.js'; while (false)
|
11
test/language/module-code/decl-pos-import-for-const.js
Normal file
11
test/language/module-code/decl-pos-import-for-const.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (const x = 0; false;)
|
||||||
|
import v from './decl-pos-import-for-const.js';
|
11
test/language/module-code/decl-pos-import-for-in-const.js
Normal file
11
test/language/module-code/decl-pos-import-for-in-const.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (const y in [])
|
||||||
|
import v from './decl-pos-import-for-in-const.js';
|
11
test/language/module-code/decl-pos-import-for-in-let.js
Normal file
11
test/language/module-code/decl-pos-import-for-in-let.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (let y in [])
|
||||||
|
import v from './decl-pos-import-for-in-let.js';
|
11
test/language/module-code/decl-pos-import-for-in-lhs.js
Normal file
11
test/language/module-code/decl-pos-import-for-in-lhs.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (y in [])
|
||||||
|
import v from './decl-pos-import-for-in-lhs.js';
|
11
test/language/module-code/decl-pos-import-for-in-var.js
Normal file
11
test/language/module-code/decl-pos-import-for-in-var.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (var y in [])
|
||||||
|
import v from './decl-pos-import-for-in-var.js';
|
11
test/language/module-code/decl-pos-import-for-let.js
Normal file
11
test/language/module-code/decl-pos-import-for-let.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (let x = 0; false;)
|
||||||
|
import v from './decl-pos-import-for-let.js';
|
11
test/language/module-code/decl-pos-import-for-lhs.js
Normal file
11
test/language/module-code/decl-pos-import-for-lhs.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (x = 0; false;)
|
||||||
|
import v from './decl-pos-import-for-lhs.js';
|
11
test/language/module-code/decl-pos-import-for-of-const.js
Normal file
11
test/language/module-code/decl-pos-import-for-of-const.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (const y of [])
|
||||||
|
import v from './decl-pos-import-for-of-const.js';
|
11
test/language/module-code/decl-pos-import-for-of-let.js
Normal file
11
test/language/module-code/decl-pos-import-for-of-let.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (let y of [])
|
||||||
|
import v from './decl-pos-import-for-of-let.js';
|
11
test/language/module-code/decl-pos-import-for-of-lhs.js
Normal file
11
test/language/module-code/decl-pos-import-for-of-lhs.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (y of [])
|
||||||
|
import v from './decl-pos-import-for-of-lhs.js';
|
11
test/language/module-code/decl-pos-import-for-of-var.js
Normal file
11
test/language/module-code/decl-pos-import-for-of-var.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (var y of [])
|
||||||
|
import v from './decl-pos-import-for-of-var.js';
|
11
test/language/module-code/decl-pos-import-for-var.js
Normal file
11
test/language/module-code/decl-pos-import-for-var.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
for (var x = 0; false;)
|
||||||
|
import v from './decl-pos-import-for-var.js';
|
10
test/language/module-code/decl-pos-import-function-decl.js
Normal file
10
test/language/module-code/decl-pos-import-function-decl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
function f() { import v from './decl-pos-import-function-decl.js'; }
|
10
test/language/module-code/decl-pos-import-function-expr.js
Normal file
10
test/language/module-code/decl-pos-import-function-expr.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(function() { import v from './decl-pos-import-function-expr.js'; });
|
10
test/language/module-code/decl-pos-import-generator-decl.js
Normal file
10
test/language/module-code/decl-pos-import-generator-decl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
function* g() { import v from './decl-pos-import-generator-decl.js'; }
|
10
test/language/module-code/decl-pos-import-generator-expr.js
Normal file
10
test/language/module-code/decl-pos-import-generator-expr.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
(function*() { import v from './decl-pos-import-generator-expr.js'; });
|
10
test/language/module-code/decl-pos-import-if-else.js
Normal file
10
test/language/module-code/decl-pos-import-if-else.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
if (true) { } else import v from './decl-pos-import-if-else.js';
|
10
test/language/module-code/decl-pos-import-if-if.js
Normal file
10
test/language/module-code/decl-pos-import-if-if.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
if (false) import v from './decl-pos-import-if-if.js';
|
10
test/language/module-code/decl-pos-import-labeled.js
Normal file
10
test/language/module-code/decl-pos-import-labeled.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
test262: import v from './decl-pos-import-labeled.js';
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ *m() { import v from './decl-pos-import-object-gen-method.js'; } });
|
10
test/language/module-code/decl-pos-import-object-getter.js
Normal file
10
test/language/module-code/decl-pos-import-object-getter.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ get m() { import v from './decl-pos-import-object-getter.js'; } });
|
10
test/language/module-code/decl-pos-import-object-method.js
Normal file
10
test/language/module-code/decl-pos-import-object-method.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ m() { import v from './decl-pos-import-object-method.js'; } });
|
10
test/language/module-code/decl-pos-import-object-setter.js
Normal file
10
test/language/module-code/decl-pos-import-object-setter.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Expression cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
({ set m(x) { import v from './decl-pos-import-object-setter.js'; } });
|
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
switch(0) { case 1: import v from './decl-pos-import-switch-case-dflt.js'; default: }
|
10
test/language/module-code/decl-pos-import-switch-case.js
Normal file
10
test/language/module-code/decl-pos-import-switch-case.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
switch(0) { case 1: import v from './decl-pos-import-switch-case.js'; }
|
10
test/language/module-code/decl-pos-import-switch-dftl.js
Normal file
10
test/language/module-code/decl-pos-import-switch-dftl.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
switch(0) { default: import v from './decl-pos-import-switch-dftl.js'; }
|
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try { } catch (err) { } finally {
|
||||||
|
import v from './decl-pos-import-try-catch-finally.js';
|
||||||
|
}
|
12
test/language/module-code/decl-pos-import-try-catch.js
Normal file
12
test/language/module-code/decl-pos-import-try-catch.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try { } catch (err) {
|
||||||
|
import v from './decl-pos-import-try-catch.js';
|
||||||
|
}
|
12
test/language/module-code/decl-pos-import-try-finally.js
Normal file
12
test/language/module-code/decl-pos-import-try-finally.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try { } finally {
|
||||||
|
import v from './decl-pos-import-try-finally.js';
|
||||||
|
}
|
12
test/language/module-code/decl-pos-import-try-try.js
Normal file
12
test/language/module-code/decl-pos-import-try-try.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
try {
|
||||||
|
import v from './decl-pos-import-try-try.js';
|
||||||
|
} catch (err) { }
|
10
test/language/module-code/decl-pos-import-while.js
Normal file
10
test/language/module-code/decl-pos-import-while.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Statement cannot contain an `import` declaration
|
||||||
|
id: sec-modules
|
||||||
|
negative: SyntaxError
|
||||||
|
flags: [module]
|
||||||
|
---*/
|
||||||
|
|
||||||
|
while (false) import v from './decl-pos-import-while.js';
|
12
test/language/module-code/strict-mode.js
Normal file
12
test/language/module-code/strict-mode.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
description: Module code is always strict mode code.
|
||||||
|
es6id: 10.2.1
|
||||||
|
id: sec-strict-mode-code
|
||||||
|
flags: [module]
|
||||||
|
negative: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
$ERROR('This statement should not be executed.');
|
||||||
|
var public;
|
11
test/language/reserved-words/await-module.js
Normal file
11
test/language/reserved-words/await-module.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
id: sec-reserved-words
|
||||||
|
es6id: 11.6.2
|
||||||
|
description: The `await` token is not permitted as an identifier in module code
|
||||||
|
flags: [module]
|
||||||
|
negative: SyntaxError
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var await;
|
9
test/language/reserved-words/await-script.js
Normal file
9
test/language/reserved-words/await-script.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
/*---
|
||||||
|
id: sec-reserved-words
|
||||||
|
es6id: 11.6.2
|
||||||
|
description: The `await` token is permitted as an identifier in script code
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var await;
|
Loading…
x
Reference in New Issue
Block a user