diff options
Diffstat (limited to 'js/src/tests/test262/language/statements/class/syntax/early-errors')
4 files changed, 36 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/class/syntax/early-errors/browser.js b/js/src/tests/test262/language/statements/class/syntax/early-errors/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/syntax/early-errors/browser.js diff --git a/js/src/tests/test262/language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js b/js/src/tests/test262/language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js new file mode 100644 index 0000000000..2217ee010e --- /dev/null +++ b/js/src/tests/test262/language/statements/class/syntax/early-errors/class-definition-evaluation-block-duplicate-binding.js @@ -0,0 +1,19 @@ +// |reftest| error:SyntaxError +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 13.1.1 +description: > + Block : { StatementList } + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains any duplicate entries. +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); +{ + class A {} + class A {} +} diff --git a/js/src/tests/test262/language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js b/js/src/tests/test262/language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js new file mode 100644 index 0000000000..fa9fe2dbba --- /dev/null +++ b/js/src/tests/test262/language/statements/class/syntax/early-errors/class-definition-evaluation-scriptbody-duplicate-binding.js @@ -0,0 +1,17 @@ +// |reftest| error:SyntaxError +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +es6id: 15.1.1 +description: > + ScriptBody : StatementList + + It is a Syntax Error if the LexicallyDeclaredNames of StatementList contains any duplicate entries. +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); +class A {} +class A {} diff --git a/js/src/tests/test262/language/statements/class/syntax/early-errors/shell.js b/js/src/tests/test262/language/statements/class/syntax/early-errors/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/syntax/early-errors/shell.js |