From e0d59b0edef14342ee615757c27e09dddc4c91bb Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 12 Jun 2015 19:03:38 -0400 Subject: [PATCH] Add tests for Unicode escape sequences - Re-organize existing tests for identifiers Name files according to their content (not their ES5 ID). Move tests for IdentifierName and LabelIdentifier to more appropriate directories. - Simplify and correct tests Instead of asserting successful runtime evaluation using `eval`, rely on the test runner's ability to detect syntax errors. Update the test bodies to test the grammar referenced by their ES5 ID and description--the IdentifierStart pattern. - Use `negative` frontmatter to assert SyntaxErrors - Remove redundant tests - Use `assert.equal` helper function - Add equivalent tests for literal unicode chars - Add tests for variable-length unicode escape --- .../object/property-name-yield.js} | 0 test/language/identifiers/S7.6_A1.2_T3.js | 21 --- test/language/identifiers/S7.6_A1.3_T3.js | 21 --- test/language/identifiers/S7.6_A2.1_T1.js | 75 --------- test/language/identifiers/S7.6_A2.1_T2.js | 75 --------- test/language/identifiers/S7.6_A2.1_T3.js | 75 --------- test/language/identifiers/S7.6_A2.1_T4.js | 48 ------ test/language/identifiers/S7.6_A4.1_T1.js | 114 -------------- test/language/identifiers/S7.6_A4.2_T1.js | 142 ------------------ test/language/identifiers/S7.6_A4.2_T2.js | 142 ------------------ test/language/identifiers/S7.6_A4.3_T1.js | 50 ------ .../identifiers/part-digits-via-escape-hex.js | 38 +++++ .../part-digits-via-escape-hex4.js | 38 +++++ test/language/identifiers/part-digits.js | 38 +++++ .../language/identifiers/start-dollar-sign.js | 20 +++ test/language/identifiers/start-escape-seq.js | 38 +++++ test/language/identifiers/start-underscore.js | 20 +++ .../language/identifiers/start-unicode-ltr.js | 20 +++ .../identifiers/val-break-via-escape-hex.js | 12 ++ ...{7.6-4.js => val-break-via-escape-hex4.js} | 12 +- test/language/identifiers/val-break.js | 11 ++ .../identifiers/val-case-via-escape-hex.js | 12 ++ .../{7.6-5.js => val-case-via-escape-hex4.js} | 12 +- test/language/identifiers/val-case.js | 11 ++ .../identifiers/val-catch-via-escape-hex.js | 12 ++ ...7.6-13.js => val-catch-via-escape-hex4.js} | 12 +- test/language/identifiers/val-catch.js | 11 ++ .../identifiers/val-class-via-escape-hex.js | 12 ++ ...7.6-30.js => val-class-via-escape-hex4.js} | 12 +- test/language/identifiers/val-class.js | 11 ++ .../identifiers/val-const-via-escape-hex.js | 12 ++ ...7.6-34.js => val-const-via-escape-hex4.js} | 12 +- test/language/identifiers/val-const.js | 11 ++ .../val-continue-via-escape-hex.js | 12 ++ ...-17.js => val-continue-via-escape-hex4.js} | 12 +- test/language/identifiers/val-continue.js | 11 ++ .../val-debugger-via-escape-hex.js | 12 ++ ...-21.js => val-debugger-via-escape-hex4.js} | 12 +- test/language/identifiers/val-debugger.js | 11 ++ .../identifiers/val-default-via-escape-hex.js | 12 ++ ...6-26.js => val-default-via-escape-hex4.js} | 12 +- test/language/identifiers/val-default.js | 11 ++ .../identifiers/val-delete-via-escape-hex.js | 12 ++ ....6-29.js => val-delete-via-escape-hex4.js} | 12 +- test/language/identifiers/val-delete.js | 11 ++ .../identifiers/val-do-via-escape-hex.js | 12 ++ .../{7.6-8.js => val-do-via-escape-hex4.js} | 12 +- test/language/identifiers/val-do.js | 11 ++ .../val-dollar-sign-via-escape-hex.js | 12 ++ ....js => val-dollar-sign-via-escape-hex4.js} | 6 +- .../{S7.6_A1.2_T1.js => val-dollar-sign.js} | 5 +- .../identifiers/val-else-via-escape-hex.js | 12 ++ .../{7.6-9.js => val-else-via-escape-hex4.js} | 12 +- test/language/identifiers/val-else.js | 11 ++ .../identifiers/val-enum-via-escape-hex.js | 12 ++ ...{7.6-32.js => val-enum-via-escape-hex4.js} | 12 +- test/language/identifiers/val-enum.js | 11 ++ .../identifiers/val-export-via-escape-hex.js | 12 ++ ....6-35.js => val-export-via-escape-hex4.js} | 12 +- test/language/identifiers/val-export.js | 11 ++ .../identifiers/val-extends-via-escape-hex.js | 12 ++ ...6-31.js => val-extends-via-escape-hex4.js} | 12 +- test/language/identifiers/val-extends.js | 11 ++ .../identifiers/val-false-via-escape-hex.js | 12 ++ ...{7.6-3.js => val-false-via-escape-hex4.js} | 12 +- test/language/identifiers/val-false.js | 11 ++ .../identifiers/val-finally-via-escape-hex.js | 12 ++ ...6-14.js => val-finally-via-escape-hex4.js} | 12 +- test/language/identifiers/val-finally.js | 11 ++ .../identifiers/val-for-via-escape-hex.js | 12 ++ .../{7.6-18.js => val-for-via-escape-hex4.js} | 12 +- test/language/identifiers/val-for.js | 11 ++ .../val-function-via-escape-hex.js | 12 ++ ...-22.js => val-function-via-escape-hex4.js} | 12 +- test/language/identifiers/val-function.js | 11 ++ .../identifiers/val-if-via-escape-hex.js | 12 ++ .../{7.6-24.js => val-if-via-escape-hex4.js} | 12 +- test/language/identifiers/val-if.js | 11 ++ .../identifiers/val-import-via-escape-hex.js | 12 ++ ....6-36.js => val-import-via-escape-hex4.js} | 12 +- test/language/identifiers/val-import.js | 11 ++ .../identifiers/val-in-via-escape-hex.js | 12 ++ .../{7.6-28.js => val-in-via-escape-hex4.js} | 12 +- test/language/identifiers/val-in.js | 11 ++ .../val-instanceof-via-escape-hex.js | 12 ++ ...6.js => val-instanceof-via-escape-hex4.js} | 12 +- test/language/identifiers/val-instanceof.js | 11 ++ .../identifiers/val-new-via-escape-hex.js | 12 ++ .../{7.6-10.js => val-new-via-escape-hex4.js} | 12 +- test/language/identifiers/val-new.js | 11 ++ .../identifiers/val-null-via-escape-hex.js | 12 ++ .../{7.6-1.js => val-null-via-escape-hex4.js} | 12 +- test/language/identifiers/val-null.js | 11 ++ .../identifiers/val-return-via-escape-hex.js | 12 ++ ....6-15.js => val-return-via-escape-hex4.js} | 12 +- test/language/identifiers/val-return.js | 11 ++ .../identifiers/val-super-via-escape-hex.js | 12 ++ ...7.6-33.js => val-super-via-escape-hex4.js} | 12 +- test/language/identifiers/val-super.js | 11 ++ .../identifiers/val-switch-via-escape-hex.js | 12 ++ ....6-19.js => val-switch-via-escape-hex4.js} | 12 +- test/language/identifiers/val-switch.js | 11 ++ .../identifiers/val-this-via-escape-hex.js | 12 ++ ...{7.6-23.js => val-this-via-escape-hex4.js} | 12 +- test/language/identifiers/val-this.js | 11 ++ .../identifiers/val-throw-via-escape-hex.js | 12 ++ ...7.6-27.js => val-throw-via-escape-hex4.js} | 12 +- test/language/identifiers/val-throw.js | 11 ++ .../identifiers/val-true-via-escape-hex.js | 12 ++ .../{7.6-2.js => val-true-via-escape-hex4.js} | 12 +- test/language/identifiers/val-true.js | 11 ++ .../identifiers/val-try-via-escape-hex.js | 12 ++ .../{7.6-12.js => val-try-via-escape-hex4.js} | 12 +- test/language/identifiers/val-try.js | 11 ++ .../identifiers/val-typeof-via-escape-hex.js | 12 ++ ...7.6-7.js => val-typeof-via-escape-hex4.js} | 12 +- test/language/identifiers/val-typeof.js | 11 ++ .../val-underscore-via-escape-hex.js | 12 ++ ...2.js => val-underscore-via-escape-hex4.js} | 6 +- .../{S7.6_A1.3_T1.js => val-underscore.js} | 5 +- .../identifiers/val-var-via-escape-hex.js | 12 ++ .../{7.6-11.js => val-var-via-escape-hex4.js} | 12 +- test/language/identifiers/val-var.js | 11 ++ .../identifiers/val-void-via-escape-hex.js | 12 ++ ...{7.6-16.js => val-void-via-escape-hex4.js} | 12 +- test/language/identifiers/val-void.js | 11 ++ .../identifiers/val-while-via-escape-hex.js | 12 ++ ...7.6-20.js => val-while-via-escape-hex4.js} | 12 +- test/language/identifiers/val-while.js | 11 ++ .../identifiers/val-with-via-escape-hex.js | 12 ++ ...{7.6-25.js => val-with-via-escape-hex4.js} | 12 +- test/language/identifiers/val-with.js | 11 ++ ...ifier-in-strict.js => val-yield-strict.js} | 0 .../vals-eng-alpha-lower-via-escape-hex.js | 86 +++++++++++ .../vals-eng-alpha-lower-via-escape-hex4.js | 86 +++++++++++ ...7.6_A4.1_T2.js => vals-eng-alpha-lower.js} | 57 ++++--- .../vals-eng-alpha-upper-via-escape-hex.js | 86 +++++++++++ .../vals-eng-alpha-upper-via-escape-hex4.js | 86 +++++++++++ .../identifiers/vals-eng-alpha-upper.js | 86 +++++++++++ .../vals-rus-alpha-lower-via-escape-hex.js | 107 +++++++++++++ .../vals-rus-alpha-lower-via-escape-hex4.js | 107 +++++++++++++ .../identifiers/vals-rus-alpha-lower.js | 107 +++++++++++++ .../vals-rus-alpha-upper-via-escape-hex.js | 107 +++++++++++++ .../vals-rus-alpha-upper-via-escape-hex4.js | 107 +++++++++++++ .../identifiers/vals-rus-alpha-upper.js | 107 +++++++++++++ .../labeled/value-yield-non-strict.js} | 0 .../labeled/value-yield-strict.js} | 0 147 files changed, 2244 insertions(+), 1166 deletions(-) rename test/language/{identifiers/yield-as-key.js => expressions/object/property-name-yield.js} (100%) delete mode 100644 test/language/identifiers/S7.6_A1.2_T3.js delete mode 100644 test/language/identifiers/S7.6_A1.3_T3.js delete mode 100644 test/language/identifiers/S7.6_A2.1_T1.js delete mode 100644 test/language/identifiers/S7.6_A2.1_T2.js delete mode 100644 test/language/identifiers/S7.6_A2.1_T3.js delete mode 100644 test/language/identifiers/S7.6_A2.1_T4.js delete mode 100644 test/language/identifiers/S7.6_A4.1_T1.js delete mode 100644 test/language/identifiers/S7.6_A4.2_T1.js delete mode 100644 test/language/identifiers/S7.6_A4.2_T2.js delete mode 100644 test/language/identifiers/S7.6_A4.3_T1.js create mode 100644 test/language/identifiers/part-digits-via-escape-hex.js create mode 100644 test/language/identifiers/part-digits-via-escape-hex4.js create mode 100644 test/language/identifiers/part-digits.js create mode 100644 test/language/identifiers/start-dollar-sign.js create mode 100644 test/language/identifiers/start-escape-seq.js create mode 100644 test/language/identifiers/start-underscore.js create mode 100644 test/language/identifiers/start-unicode-ltr.js create mode 100644 test/language/identifiers/val-break-via-escape-hex.js rename test/language/identifiers/{7.6-4.js => val-break-via-escape-hex4.js} (63%) create mode 100644 test/language/identifiers/val-break.js create mode 100644 test/language/identifiers/val-case-via-escape-hex.js rename test/language/identifiers/{7.6-5.js => val-case-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-case.js create mode 100644 test/language/identifiers/val-catch-via-escape-hex.js rename test/language/identifiers/{7.6-13.js => val-catch-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-catch.js create mode 100644 test/language/identifiers/val-class-via-escape-hex.js rename test/language/identifiers/{7.6-30.js => val-class-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-class.js create mode 100644 test/language/identifiers/val-const-via-escape-hex.js rename test/language/identifiers/{7.6-34.js => val-const-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-const.js create mode 100644 test/language/identifiers/val-continue-via-escape-hex.js rename test/language/identifiers/{7.6-17.js => val-continue-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-continue.js create mode 100644 test/language/identifiers/val-debugger-via-escape-hex.js rename test/language/identifiers/{7.6-21.js => val-debugger-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-debugger.js create mode 100644 test/language/identifiers/val-default-via-escape-hex.js rename test/language/identifiers/{7.6-26.js => val-default-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-default.js create mode 100644 test/language/identifiers/val-delete-via-escape-hex.js rename test/language/identifiers/{7.6-29.js => val-delete-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-delete.js create mode 100644 test/language/identifiers/val-do-via-escape-hex.js rename test/language/identifiers/{7.6-8.js => val-do-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-do.js create mode 100644 test/language/identifiers/val-dollar-sign-via-escape-hex.js rename test/language/identifiers/{S7.6_A1.2_T2.js => val-dollar-sign-via-escape-hex4.js} (75%) rename test/language/identifiers/{S7.6_A1.2_T1.js => val-dollar-sign.js} (78%) create mode 100644 test/language/identifiers/val-else-via-escape-hex.js rename test/language/identifiers/{7.6-9.js => val-else-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-else.js create mode 100644 test/language/identifiers/val-enum-via-escape-hex.js rename test/language/identifiers/{7.6-32.js => val-enum-via-escape-hex4.js} (63%) create mode 100644 test/language/identifiers/val-enum.js create mode 100644 test/language/identifiers/val-export-via-escape-hex.js rename test/language/identifiers/{7.6-35.js => val-export-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-export.js create mode 100644 test/language/identifiers/val-extends-via-escape-hex.js rename test/language/identifiers/{7.6-31.js => val-extends-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-extends.js create mode 100644 test/language/identifiers/val-false-via-escape-hex.js rename test/language/identifiers/{7.6-3.js => val-false-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-false.js create mode 100644 test/language/identifiers/val-finally-via-escape-hex.js rename test/language/identifiers/{7.6-14.js => val-finally-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-finally.js create mode 100644 test/language/identifiers/val-for-via-escape-hex.js rename test/language/identifiers/{7.6-18.js => val-for-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-for.js create mode 100644 test/language/identifiers/val-function-via-escape-hex.js rename test/language/identifiers/{7.6-22.js => val-function-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-function.js create mode 100644 test/language/identifiers/val-if-via-escape-hex.js rename test/language/identifiers/{7.6-24.js => val-if-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-if.js create mode 100644 test/language/identifiers/val-import-via-escape-hex.js rename test/language/identifiers/{7.6-36.js => val-import-via-escape-hex4.js} (63%) create mode 100644 test/language/identifiers/val-import.js create mode 100644 test/language/identifiers/val-in-via-escape-hex.js rename test/language/identifiers/{7.6-28.js => val-in-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-in.js create mode 100644 test/language/identifiers/val-instanceof-via-escape-hex.js rename test/language/identifiers/{7.6-6.js => val-instanceof-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-instanceof.js create mode 100644 test/language/identifiers/val-new-via-escape-hex.js rename test/language/identifiers/{7.6-10.js => val-new-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-new.js create mode 100644 test/language/identifiers/val-null-via-escape-hex.js rename test/language/identifiers/{7.6-1.js => val-null-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-null.js create mode 100644 test/language/identifiers/val-return-via-escape-hex.js rename test/language/identifiers/{7.6-15.js => val-return-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-return.js create mode 100644 test/language/identifiers/val-super-via-escape-hex.js rename test/language/identifiers/{7.6-33.js => val-super-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-super.js create mode 100644 test/language/identifiers/val-switch-via-escape-hex.js rename test/language/identifiers/{7.6-19.js => val-switch-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-switch.js create mode 100644 test/language/identifiers/val-this-via-escape-hex.js rename test/language/identifiers/{7.6-23.js => val-this-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-this.js create mode 100644 test/language/identifiers/val-throw-via-escape-hex.js rename test/language/identifiers/{7.6-27.js => val-throw-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-throw.js create mode 100644 test/language/identifiers/val-true-via-escape-hex.js rename test/language/identifiers/{7.6-2.js => val-true-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-true.js create mode 100644 test/language/identifiers/val-try-via-escape-hex.js rename test/language/identifiers/{7.6-12.js => val-try-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-try.js create mode 100644 test/language/identifiers/val-typeof-via-escape-hex.js rename test/language/identifiers/{7.6-7.js => val-typeof-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-typeof.js create mode 100644 test/language/identifiers/val-underscore-via-escape-hex.js rename test/language/identifiers/{S7.6_A1.3_T2.js => val-underscore-via-escape-hex4.js} (75%) rename test/language/identifiers/{S7.6_A1.3_T1.js => val-underscore.js} (78%) create mode 100644 test/language/identifiers/val-var-via-escape-hex.js rename test/language/identifiers/{7.6-11.js => val-var-via-escape-hex4.js} (64%) create mode 100644 test/language/identifiers/val-var.js create mode 100644 test/language/identifiers/val-void-via-escape-hex.js rename test/language/identifiers/{7.6-16.js => val-void-via-escape-hex4.js} (63%) create mode 100644 test/language/identifiers/val-void.js create mode 100644 test/language/identifiers/val-while-via-escape-hex.js rename test/language/identifiers/{7.6-20.js => val-while-via-escape-hex4.js} (63%) create mode 100644 test/language/identifiers/val-while.js create mode 100644 test/language/identifiers/val-with-via-escape-hex.js rename test/language/identifiers/{7.6-25.js => val-with-via-escape-hex4.js} (65%) create mode 100644 test/language/identifiers/val-with.js rename test/language/identifiers/{yield-as-binding-identifier-in-strict.js => val-yield-strict.js} (100%) create mode 100644 test/language/identifiers/vals-eng-alpha-lower-via-escape-hex.js create mode 100644 test/language/identifiers/vals-eng-alpha-lower-via-escape-hex4.js rename test/language/identifiers/{S7.6_A4.1_T2.js => vals-eng-alpha-lower.js} (67%) create mode 100644 test/language/identifiers/vals-eng-alpha-upper-via-escape-hex.js create mode 100644 test/language/identifiers/vals-eng-alpha-upper-via-escape-hex4.js create mode 100644 test/language/identifiers/vals-eng-alpha-upper.js create mode 100644 test/language/identifiers/vals-rus-alpha-lower-via-escape-hex.js create mode 100644 test/language/identifiers/vals-rus-alpha-lower-via-escape-hex4.js create mode 100644 test/language/identifiers/vals-rus-alpha-lower.js create mode 100644 test/language/identifiers/vals-rus-alpha-upper-via-escape-hex.js create mode 100644 test/language/identifiers/vals-rus-alpha-upper-via-escape-hex4.js create mode 100644 test/language/identifiers/vals-rus-alpha-upper.js rename test/language/{identifiers/yield-as-label-in-sloppy.js => statements/labeled/value-yield-non-strict.js} (100%) rename test/language/{identifiers/yield-as-label-in-strict.js => statements/labeled/value-yield-strict.js} (100%) diff --git a/test/language/identifiers/yield-as-key.js b/test/language/expressions/object/property-name-yield.js similarity index 100% rename from test/language/identifiers/yield-as-key.js rename to test/language/expressions/object/property-name-yield.js diff --git a/test/language/identifiers/S7.6_A1.2_T3.js b/test/language/identifiers/S7.6_A1.2_T3.js deleted file mode 100644 index 171dd1a059..0000000000 --- a/test/language/identifiers/S7.6_A1.2_T3.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "IdentifierStart :: $" -es5id: 7.6_A1.2_T3 -description: The $ as unicode character \u0024 ----*/ - -//CHECK#1 -var identifier = String.fromCharCode(0x0024); -var result; -eval("var " + identifier + "=1; result = " + identifier); -if (result !== 1) { - $ERROR('#1: var identifier = String.fromCharCode(0x0024); eval("var " + identifier + "=1; result = " + identifier); result === 1'); -} - -//CHECK#2 -if ("$" !== String.fromCharCode(0x0024)) { - $ERROR('#2: "$" === String.fromCharCode(0x0024)'); -} diff --git a/test/language/identifiers/S7.6_A1.3_T3.js b/test/language/identifiers/S7.6_A1.3_T3.js deleted file mode 100644 index 2e1766f19e..0000000000 --- a/test/language/identifiers/S7.6_A1.3_T3.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "IdentifierStart :: _" -es5id: 7.6_A1.3_T3 -description: The _ as unicode character \u005F ----*/ - -//CHECK#1 -var identifier = String.fromCharCode(0x005F); -var result; -eval("var " + identifier + "=1; result = " + identifier); -if (result !== 1) { - $ERROR('#1: var identifier = String.fromCharCode(0x005F); eval("var " + identifier + "=1; result = " + identifier); result === 1'); -} - -//CHECK#2 -if ("_" !== String.fromCharCode(0x005F)) { - $ERROR('#2: "_" === String.fromCharCode(0x005F)'); -} diff --git a/test/language/identifiers/S7.6_A2.1_T1.js b/test/language/identifiers/S7.6_A2.1_T1.js deleted file mode 100644 index 7d15c5f7c0..0000000000 --- a/test/language/identifiers/S7.6_A2.1_T1.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "IdentifierPart :: IdentifierStart" -es5id: 7.6_A2.1_T1 -description: "IdentifierStart :: UnicodeLetter" ----*/ - -var result; - -//CHECK#1 -try { - var identifier = "x" + "x"; - eval("var " + identifier + "=1; result = xx"); - if (result !== 1) { - $ERROR('#1.1: var identifier = "x" + "x"; eval("var " + identifier + "=1; result = xx"); result === 1. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#1.2: var identifier = "x" + "x"; eval("var " + identifier + "=1; result = xx"); result === 1. Actual: ' + (result)); -} - -//CHECK#2 -try { - var identifier = "x" + String.fromCharCode(0x0078); - eval("var " + identifier + "=2; result = xx"); - if (result !== 2) { - $ERROR('#2.1: var identifier = "x" + String.fromCharCode(0x0078); eval("var " + identifier + "=2; result = xx"); result === 2. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#2.2: var identifier = "x" + String.fromCharCode(0x0078); eval("var " + identifier + "=2; result = xx"); result === 2. Actual: ' + (result)); -} - -//CHECK#3 -try { - var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); - eval("var " + identifier + "=3; result = xx"); - if (result !== 3) { - $ERROR('#3.1: var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); eval("var " + identifier + "=3; result = xx"); result === 3. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#3.2: var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); eval("var " + identifier + "=3; result = xx"); result === 3. Actual: ' + (result)); -} - -//CHECK#4 -try { - var identifier = "$" + String.fromCharCode(0x0078); - eval("var " + identifier + "=4; result = $x"); - if (result !== 4) { - $ERROR('#4.1: var identifier = "$" + String.fromCharCode(0x0078); eval("var " + identifier + "=4; result = $x"); result === 4. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#4.2: var identifier = "$" + String.fromCharCode(0x0078); eval("var " + identifier + "=4; result = $x"); result === 4. Actual: ' + (result)); -} - -//CHECK#5 -try { - var identifier = "_" + String.fromCharCode(0x0078); - eval("var " + identifier + "=5; result = _x"); - if (result !== 5) { - $ERROR('#5.1: var identifier = "_" + String.fromCharCode(0x0078); eval("var " + identifier + "=5; result = _x"); result === 5. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#5.2: var identifier = "_" + String.fromCharCode(0x0078); eval("var " + identifier + "=5; result = _x"); result === 5. Actual: ' + (result)); -} - -//CHECK#6 -try { - var \u0078x = 6; - if (xx !== 6) { - $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); - } -} catch (e) { - $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); -} diff --git a/test/language/identifiers/S7.6_A2.1_T2.js b/test/language/identifiers/S7.6_A2.1_T2.js deleted file mode 100644 index e9a1a451a9..0000000000 --- a/test/language/identifiers/S7.6_A2.1_T2.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "IdentifierPart :: IdentifierStart" -es5id: 7.6_A2.1_T2 -description: "IdentifierStart :: $" ----*/ - -var result; - -//CHECK#1 -try { - var identifier = "x" + "$"; - eval("var " + identifier + "=1; result = x$"); - if (result !== 1) { - $ERROR('#1.1: var identifier = "x" + "$"; eval("var " + identifier + "=1; result = x$"); result === 1. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#1.2: var identifier = "x" + "$"; eval("var " + identifier + "=1; result = x$"); result === 1. Actual: ' + (result)); -} - -//CHECK#2 -try { - var identifier = String.fromCharCode(0x0078) + "$"; - eval("var " + identifier + "=2; result = x$"); - if (result !== 2) { - $ERROR('#2.1: var identifier = String.fromCharCode(0x0078) + "$"; eval("var " + identifier + "=2; result = x$"); result === 2. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#2.2: var identifier = String.fromCharCode(0x0078) + "$"; eval("var " + identifier + "=2; result = x$"); result === 2. Actual: ' + (result)); -} - -//CHECK#3 -try { - var identifier = "$" + "$"; - eval("var " + identifier + "=3; result = $$"); - if (result !== 3) { - $ERROR('#3.1: var identifier = "$" + "$"; eval("var " + identifier + "=3; result = $$"); result === 3. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#3.2: var identifier = "$" + "$"; eval("var " + identifier + "=3; result = $$"); result === 3. Actual: ' + (result)); -} - -//CHECK#4 -try { - var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); - eval("var " + identifier + "=4; result = $$"); - if (result !== 4) { - $ERROR('#4.1: var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); eval("var " + identifier + "=4; result = $$"); result === 4. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#4.2: var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); eval("var " + identifier + "=4; result = $$"); result === 4. Actual: ' + (result)); -} - -//CHECK#5 -try { - var identifier = "_" + "$"; - eval("var " + identifier + "=5; result = _$"); - if (result !== 5) { - $ERROR('#5.1: var identifier = "_" + "$"; eval("var " + identifier + "=5; result = _$"); result === 5. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#5.2: var identifier = "_" + "$"; eval("var " + identifier + "=5; result = _$"); result === 5. Actual: ' + (result)); -} - -//CHECK#6 -try { - var \u0078$ = 6; - if (x$ !== 6) { - $ERROR('#6.1: var \\u0078$ = 1; x$ === 6. Actual: ' + (x$)); - } -} catch (e) { - $ERROR('#6.2: var \\u0078$ = 1; x$ === 6. Actual: ' + (x$)); -} diff --git a/test/language/identifiers/S7.6_A2.1_T3.js b/test/language/identifiers/S7.6_A2.1_T3.js deleted file mode 100644 index d270a1a0f5..0000000000 --- a/test/language/identifiers/S7.6_A2.1_T3.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "IdentifierPart :: IdentifierStart" -es5id: 7.6_A2.1_T3 -description: "IdentifierStart :: _" ----*/ - -var result; - -//CHECK#1 -try { - var identifier = "x" + "_"; - eval("var " + identifier + "=1; result = x_"); - if (result !== 1) { - $ERROR('#1.1: var identifier = "x" + "_"; eval("var " + identifier + "=1; result = x_"); result === 1. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#1.2: var identifier = "x" + "_"; eval("var " + identifier + "=1; result = x_"); result === 1. Actual: ' + (result)); -} - -//CHECK#2 -try { - var identifier = String.fromCharCode(0x0078) + "_"; - eval("var " + identifier + "=2; result = x_"); - if (result !== 2) { - $ERROR('#2.1: var identifier = String.fromCharCode(0x0078) + "_"; eval("var " + identifier + "=2; result = x_"); result === 2. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#2.2: var identifier = String.fromCharCode(0x0078) + "_"; eval("var " + identifier + "=2; result = x_"); result === 2. Actual: ' + (result)); -} - -//CHECK#3 -try { - var identifier = "_" + "_"; - eval("var " + identifier + "=3; result = __"); - if (result !== 3) { - $ERROR('#3.1: var identifier = "_" + "_"; eval("var " + identifier + "=3; result = __"); result === 3. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#3.2: var identifier = "_" + "_"; eval("var " + identifier + "=3; result = __"); result === 3. Actual: ' + (result)); -} - -//CHECK#4 -try { - var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); - eval("var " + identifier + "=4; result = __"); - if (result !== 4) { - $ERROR('#4.1: var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); eval("var " + identifier + "=4; result = __"); result === 4. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#4.2: var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); eval("var " + identifier + "=4; result = __"); result === 4. Actual: ' + (result)); -} - -//CHECK#5 -try { - var identifier = "_" + "_"; - eval("var " + identifier + "=5; result = __"); - if (result !== 5) { - $ERROR('#5.1: var identifier = "_" + "_"; eval("var " + identifier + "=5; result = __"); result === 5. Actual: ' + (result)); - } -} catch (e) { - $ERROR('#5.2: var identifier = "_" + "_"; eval("var " + identifier + "=5; result = __"); result === 5. Actual: ' + (result)); -} - -//CHECK#6 -try { - var \u0078_ = 6; - if (x_ !== 6) { - $ERROR('#6.1: var \\u0078_ = 1; x_ === 6. Actual: ' + (x_)); - } -} catch (e) { - $ERROR('#6.2: var \\u0078_ = 1; x_ === 6. Actual: ' + (x_)); -} diff --git a/test/language/identifiers/S7.6_A2.1_T4.js b/test/language/identifiers/S7.6_A2.1_T4.js deleted file mode 100644 index 892ddc496f..0000000000 --- a/test/language/identifiers/S7.6_A2.1_T4.js +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: "IdentifierPart :: IdentifierStart" -es5id: 7.6_A2.1_T4 -description: "IdentifierStart :: \\UnicodeEscapeSequence" ----*/ - -//CHECK#1 -try { - var x\u0078 = 1; - if (xx !== 1) { - $ERROR('#1.1: var x\\u0078 = 1; xx === 1. Actual: ' + (xx)); - } -} catch (e) { - $ERROR('#1.2: var x\\u0078 = 1; xx === 1. Actual: ' + (xx)); -} - -//CHECK#2 -try { - var \u0078\u0078 = 2; - if (xx !== 2) { - $ERROR('#2.1: var \\u0078\\u0078 = 1; xx === 2. Actual: ' + (xx)); - } -} catch (e) { - $ERROR('#2.2: var \\u0078\\u0078 = 1; xx === 2. Actual: ' + (xx)); -} - -//CHECK#3 -try { - var \u0024\u0024 = 3; - if ($$ !== 3) { - $ERROR('#3.1: var \\u0024\\u0024 = 1; $$ === 3. Actual: ' + ($$)); - } -} catch (e) { - $ERROR('#3.2: var \\u0024\\u0024 = 1; $$ === 3. Actual: ' + ($$)); -} - -//CHECK#4 -try { - var \u005F\u005F = 4; - if (__ !== 4) { - $ERROR('#4.1: var \\u005F\\u005F = 1; __ === 4. Actual: ' + (__)); - } -} catch (e) { - $ERROR('#4.2: var \\u005F\\u005F = 1; __ === 4. Actual: ' + (__)); -} diff --git a/test/language/identifiers/S7.6_A4.1_T1.js b/test/language/identifiers/S7.6_A4.1_T1.js deleted file mode 100644 index f035d0a380..0000000000 --- a/test/language/identifiers/S7.6_A4.1_T1.js +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Correct interpretation of ENGLISH ALPHABET -es5id: 7.6_A4.1_T1 -description: Check ENGLISH CAPITAL ALPHABET ----*/ - -//CHECK#A-Z -var \u0041 = 1; -if (A !== 1) { - $ERROR('#A'); -} -var \u0042 = 1; -if (B !== 1) { - $ERROR('#B'); -} -var \u0043 = 1; -if (C !== 1) { - $ERROR('#C'); -} -var \u0044 = 1; -if (D !== 1) { - $ERROR('#D'); -} -var \u0045 = 1; -if (E !== 1) { - $ERROR('#E'); -} -var \u0046 = 1; -if (F !== 1) { - $ERROR('#F'); -} -var \u0047 = 1; -if (G !== 1) { - $ERROR('#G'); -} -var \u0048 = 1; -if (H !== 1) { - $ERROR('#H'); -} -var \u0049 = 1; -if (I !== 1) { - $ERROR('#I'); -} -var \u004A = 1; -if (J !== 1) { - $ERROR('#J'); -} -var \u004B = 1; -if (K !== 1) { - $ERROR('#K'); -} -var \u004C = 1; -if (L !== 1) { - $ERROR('#L'); -} -var \u004D = 1; -if (M !== 1) { - $ERROR('#M'); -} -var \u004E = 1; -if (N !== 1) { - $ERROR('#N'); -} -var \u004F = 1; -if (O !== 1) { - $ERROR('#O'); -} -var \u0050 = 1; -if (P !== 1) { - $ERROR('#P'); -} -var \u0051 = 1; -if (Q !== 1) { - $ERROR('#Q'); -} -var \u0052 = 1; -if (R !== 1) { - $ERROR('#R'); -} -var \u0053 = 1; -if (S !== 1) { - $ERROR('#S'); -} -var \u0054 = 1; -if (T !== 1) { - $ERROR('#T'); -} -var \u0055 = 1; -if (U !== 1) { - $ERROR('#U'); -} -var \u0056 = 1; -if (V !== 1) { - $ERROR('#V'); -} -var \u0057 = 1; -if (W !== 1) { - $ERROR('#W'); -} -var \u0058 = 1; -if (X !== 1) { - $ERROR('#X'); -} -var \u0059 = 1; -if (Y !== 1) { - $ERROR('#Y'); -} -var \u005A = 1; -if (Z !== 1) { - $ERROR('#Z'); -} diff --git a/test/language/identifiers/S7.6_A4.2_T1.js b/test/language/identifiers/S7.6_A4.2_T1.js deleted file mode 100644 index 5e92a48621..0000000000 --- a/test/language/identifiers/S7.6_A4.2_T1.js +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Correct interpretation of RUSSIAN ALPHABET -es5id: 7.6_A4.2_T1 -description: Check RUSSIAN CAPITAL ALPHABET ----*/ - -//CHECK#А-Я -var \u0410 = 1; -if (А !== 1) { - $ERROR('#А'); -} -var \u0411 = 1; -if (Б !== 1) { - $ERROR('#Б'); -} -var \u0412 = 1; -if (В !== 1) { - $ERROR('#В'); -} -var \u0413 = 1; -if (Г !== 1) { - $ERROR('#Г'); -} -var \u0414 = 1; -if (Д !== 1) { - $ERROR('#Д'); -} -var \u0415 = 1; -if (Е !== 1) { - $ERROR('#Е'); -} -var \u0416 = 1; -if (Ж !== 1) { - $ERROR('#Ж'); -} -var \u0417 = 1; -if (З !== 1) { - $ERROR('#З'); -} -var \u0418 = 1; -if (И !== 1) { - $ERROR('#И'); -} -var \u0419 = 1; -if (Й !== 1) { - $ERROR('#Й'); -} -var \u041A = 1; -if (К !== 1) { - $ERROR('#К'); -} -var \u041B = 1; -if (Л !== 1) { - $ERROR('#Л'); -} -var \u041C = 1; -if (М !== 1) { - $ERROR('#М'); -} -var \u041D = 1; -if (Н !== 1) { - $ERROR('#Н'); -} -var \u041E = 1; -if (О !== 1) { - $ERROR('#О'); -} -var \u041F = 1; -if (П !== 1) { - $ERROR('#П'); -} -var \u0420 = 1; -if (Р !== 1) { - $ERROR('#Р'); -} -var \u0421 = 1; -if (С !== 1) { - $ERROR('#С'); -} -var \u0422 = 1; -if (Т !== 1) { - $ERROR('#Т'); -} -var \u0423 = 1; -if (У !== 1) { - $ERROR('#У'); -} -var \u0424 = 1; -if (Ф !== 1) { - $ERROR('#Ф'); -} -var \u0425 = 1; -if (Х !== 1) { - $ERROR('#Х'); -} -var \u0426 = 1; -if (Ц !== 1) { - $ERROR('#Ц'); -} -var \u0427 = 1; -if (Ч !== 1) { - $ERROR('#Ч'); -} -var \u0428 = 1; -if (Ш !== 1) { - $ERROR('#Ш'); -} -var \u0429 = 1; -if (Щ !== 1) { - $ERROR('#Щ'); -} -var \u042A = 1; -if (Ъ !== 1) { - $ERROR('#Ъ'); -} -var \u042B = 1; -if (Ы !== 1) { - $ERROR('#Ы'); -} -var \u042C = 1; -if (Ь !== 1) { - $ERROR('#Ь'); -} -var \u042D = 1; -if (Э !== 1) { - $ERROR('#Э'); -} -var \u042E = 1; -if (Ю !== 1) { - $ERROR('#Ю'); -} -var \u042F = 1; -if (Я !== 1) { - $ERROR('#Я'); -} -var \u0401 = 1; -if (Ё !== 1) { - $ERROR('#Ё'); -} diff --git a/test/language/identifiers/S7.6_A4.2_T2.js b/test/language/identifiers/S7.6_A4.2_T2.js deleted file mode 100644 index 6f9a3fa967..0000000000 --- a/test/language/identifiers/S7.6_A4.2_T2.js +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Correct interpretation of RUSSIAN ALPHABET -es5id: 7.6_A4.2_T2 -description: Check RUSSIAN SMALL ALPHABET ----*/ - -//CHECK#а-я -var \u0430 = 1; -if (а !== 1) { - $ERROR('#а'); -} -var \u0431 = 1; -if (б !== 1) { - $ERROR('#б'); -} -var \u0432 = 1; -if (в !== 1) { - $ERROR('#в'); -} -var \u0433 = 1; -if (г !== 1) { - $ERROR('#г'); -} -var \u0434 = 1; -if (д !== 1) { - $ERROR('#д'); -} -var \u0435 = 1; -if (е !== 1) { - $ERROR('#е'); -} -var \u0436 = 1; -if (ж !== 1) { - $ERROR('#ж'); -} -var \u0437 = 1; -if (з !== 1) { - $ERROR('#з'); -} -var \u0438 = 1; -if (и !== 1) { - $ERROR('#и'); -} -var \u0439 = 1; -if (й !== 1) { - $ERROR('#й'); -} -var \u043A = 1; -if (к !== 1) { - $ERROR('#к'); -} -var \u043B = 1; -if (л !== 1) { - $ERROR('#л'); -} -var \u043C = 1; -if (м !== 1) { - $ERROR('#м'); -} -var \u043D = 1; -if (н !== 1) { - $ERROR('#н'); -} -var \u043E = 1; -if (о !== 1) { - $ERROR('#о'); -} -var \u043F = 1; -if (п !== 1) { - $ERROR('#п'); -} -var \u0440 = 1; -if (р !== 1) { - $ERROR('#р'); -} -var \u0441 = 1; -if (с !== 1) { - $ERROR('#с'); -} -var \u0442 = 1; -if (т !== 1) { - $ERROR('#т'); -} -var \u0443 = 1; -if (у !== 1) { - $ERROR('#у'); -} -var \u0444 = 1; -if (ф !== 1) { - $ERROR('#ф'); -} -var \u0445 = 1; -if (х !== 1) { - $ERROR('#х'); -} -var \u0446 = 1; -if (ц !== 1) { - $ERROR('#ц'); -} -var \u0447 = 1; -if (ч !== 1) { - $ERROR('#ч'); -} -var \u0448 = 1; -if (ш !== 1) { - $ERROR('#ш'); -} -var \u0449 = 1; -if (щ !== 1) { - $ERROR('#щ'); -} -var \u044A = 1; -if (ъ !== 1) { - $ERROR('#ъ'); -} -var \u044B = 1; -if (ы !== 1) { - $ERROR('#ы'); -} -var \u044C = 1; -if (ь !== 1) { - $ERROR('#ь'); -} -var \u044D = 1; -if (э !== 1) { - $ERROR('#э'); -} -var \u044E = 1; -if (ю !== 1) { - $ERROR('#ю'); -} -var \u044F = 1; -if (я !== 1) { - $ERROR('#я'); -} -var \u0451 = 1; -if (ё !== 1) { - $ERROR('#ё'); -} diff --git a/test/language/identifiers/S7.6_A4.3_T1.js b/test/language/identifiers/S7.6_A4.3_T1.js deleted file mode 100644 index 54a46543f0..0000000000 --- a/test/language/identifiers/S7.6_A4.3_T1.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Correct interpretation of DIGITS -es5id: 7.6_A4.3_T1 -description: Identifier is $+ANY_DIGIT ----*/ - -//CHECK#0-9 -var $\u0030 = 0; -if ($0 !== 0) { - $ERROR('#0: $\\u0030 = 0; $0 === 0'); -} -var $\u0031 = 1; -if ($1 !== 1) { - $ERROR('#1: $\\u0031 = 1; $1 === 1'); -} -var $\u0032 = 2; -if ($2 !== 2) { - $ERROR('#2: $\\u0032 = 2; $2 === 2'); -} -var $\u0033 = 3; -if ($3 !== 3) { - $ERROR('#3: $\\u0033 = 3; $3 === 3'); -} -var $\u0034 = 4; -if ($4 !== 4) { - $ERROR('#4: $\\u0034 = 4; $4 === 4'); -} -var $\u0035 = 5; -if ($5 !== 5) { - $ERROR('#5: $\\u0035 = 5; $5 === 5'); -} -var $\u0036 = 6; -if ($6 !== 6) { - $ERROR('#6: $\\u0036 = 6; $6 === 6'); -} -var $\u0037 = 7; -if ($7 !== 7) { - $ERROR('#7: $\\u0037 = 7; $7 === 7'); -} -var $\u0038 = 8; -if ($8 !== 8) { - $ERROR('#8: $\\u0038 = 8; $8 === 8'); -} -var $\u0039 = 9; -if ($9 !== 9) { - $ERROR('#9: $\\u0039 = 9; $9 === 9'); -} diff --git a/test/language/identifiers/part-digits-via-escape-hex.js b/test/language/identifiers/part-digits-via-escape-hex.js new file mode 100644 index 0000000000..b53009cdf1 --- /dev/null +++ b/test/language/identifiers/part-digits-via-escape-hex.js @@ -0,0 +1,38 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of DIGITS +es6id: 11.6 +description: Identifier is $+ANY_DIGIT +---*/ + +var $\u{30} = 0; +assert.sameValue($0, 0); + +var $\u{31} = 1; +assert.sameValue($1, 1); + +var $\u{32} = 2; +assert.sameValue($2, 2); + +var $\u{33} = 3; +assert.sameValue($3, 3); + +var $\u{34} = 4; +assert.sameValue($4, 4); + +var $\u{35} = 5; +assert.sameValue($5, 5); + +var $\u{36} = 6; +assert.sameValue($6, 6); + +var $\u{37} = 7; +assert.sameValue($7, 7); + +var $\u{38} = 8; +assert.sameValue($8, 8); + +var $\u{39} = 9; +assert.sameValue($9, 9); diff --git a/test/language/identifiers/part-digits-via-escape-hex4.js b/test/language/identifiers/part-digits-via-escape-hex4.js new file mode 100644 index 0000000000..171143709d --- /dev/null +++ b/test/language/identifiers/part-digits-via-escape-hex4.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of DIGITS +es5id: 7.6_A4.3_T1 +description: Identifier is $+ANY_DIGIT +---*/ + +var $\u0030 = 0; +assert.sameValue($0, 0); + +var $\u0031 = 1; +assert.sameValue($1, 1); + +var $\u0032 = 2; +assert.sameValue($2, 2); + +var $\u0033 = 3; +assert.sameValue($3, 3); + +var $\u0034 = 4; +assert.sameValue($4, 4); + +var $\u0035 = 5; +assert.sameValue($5, 5); + +var $\u0036 = 6; +assert.sameValue($6, 6); + +var $\u0037 = 7; +assert.sameValue($7, 7); + +var $\u0038 = 8; +assert.sameValue($8, 8); + +var $\u0039 = 9; +assert.sameValue($9, 9); diff --git a/test/language/identifiers/part-digits.js b/test/language/identifiers/part-digits.js new file mode 100644 index 0000000000..0acf1b4845 --- /dev/null +++ b/test/language/identifiers/part-digits.js @@ -0,0 +1,38 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of DIGITS +es6id: 11.6 +description: Identifier is $+ANY_DIGIT +---*/ + +var $0 = 0; +assert.sameValue($0, 0); + +var $1 = 1; +assert.sameValue($1, 1); + +var $2 = 2; +assert.sameValue($2, 2); + +var $3 = 3; +assert.sameValue($3, 3); + +var $4 = 4; +assert.sameValue($4, 4); + +var $5 = 5; +assert.sameValue($5, 5); + +var $6 = 6; +assert.sameValue($6, 6); + +var $7 = 7; +assert.sameValue($7, 7); + +var $8 = 8; +assert.sameValue($8, 8); + +var $9 = 9; +assert.sameValue($9, 9); diff --git a/test/language/identifiers/start-dollar-sign.js b/test/language/identifiers/start-dollar-sign.js new file mode 100644 index 0000000000..b54080cbd9 --- /dev/null +++ b/test/language/identifiers/start-dollar-sign.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T2 +description: "IdentifierStart :: $" +---*/ + +var $ = 1; +assert.sameValue($, 1); + +var $x = 2; +assert.sameValue($x, 2); + +var $$ = 3; +assert.sameValue($$, 3); + +var $_ = 4; +assert.sameValue($_, 4); diff --git a/test/language/identifiers/start-escape-seq.js b/test/language/identifiers/start-escape-seq.js new file mode 100644 index 0000000000..775d517642 --- /dev/null +++ b/test/language/identifiers/start-escape-seq.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T4 +description: "IdentifierStart :: \\UnicodeEscapeSequence" +---*/ + +var \u0078 = 1; +assert.sameValue(x, 1); + +var \u0078\u0078 = 2; +assert.sameValue(xx, 2); + +var \u0024 = 3; +assert.sameValue($, 3); + +var \u0024x = 4; +assert.sameValue($x, 4); + +var \u0024\u0024 = 5; +assert.sameValue($$, 5); + +var \u0024_ = 6; +assert.sameValue($_, 6); + +var \u005F = 7; +assert.sameValue(_, 7); + +var \u005Fx = 8; +assert.sameValue(_x, 8); + +var \u005F$ = 9; +assert.sameValue(_$, 9); + +var \u005F\u005F = 10; +assert.sameValue(__, 10); diff --git a/test/language/identifiers/start-underscore.js b/test/language/identifiers/start-underscore.js new file mode 100644 index 0000000000..cba4e956cc --- /dev/null +++ b/test/language/identifiers/start-underscore.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T3 +description: "IdentifierStart :: _" +---*/ + +var _ = 1; +assert.sameValue(_, 1); + +var _x = 2; +assert.sameValue(_x, 2); + +var _$ = 3; +assert.sameValue(_$, 3); + +var __ = 4; +assert.sameValue(__, 4); diff --git a/test/language/identifiers/start-unicode-ltr.js b/test/language/identifiers/start-unicode-ltr.js new file mode 100644 index 0000000000..af7651c8c7 --- /dev/null +++ b/test/language/identifiers/start-unicode-ltr.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "IdentifierPart :: IdentifierStart" +es5id: 7.6_A2.1_T1 +description: "IdentifierStart :: UnicodeLetter" +---*/ + +var x = 1; +assert.sameValue(x, 1); + +var xx = 2; +assert.sameValue(xx, 2); + +var x$ = 3; +assert.sameValue(x$, 3); + +var x_ = 4; +assert.sameValue(x_, 4); diff --git a/test/language/identifiers/val-break-via-escape-hex.js b/test/language/identifiers/val-break-via-escape-hex.js new file mode 100644 index 0000000000..42a6cc920f --- /dev/null +++ b/test/language/identifiers/val-break-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: break +negative: SyntaxError +---*/ + +var \u{62}\u{72}\u{65}\u{61}\u{6b} = 123;; diff --git a/test/language/identifiers/7.6-4.js b/test/language/identifiers/val-break-via-escape-hex4.js similarity index 63% rename from test/language/identifiers/7.6-4.js rename to test/language/identifiers/val-break-via-escape-hex4.js index 07f6c763ee..6ad296341d 100644 --- a/test/language/identifiers/7.6-4.js +++ b/test/language/identifiers/val-break-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-4 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: break (break) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0062\u0072\u0065\u0061\u006b = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0062\u0072\u0065\u0061\u006b = 123;; diff --git a/test/language/identifiers/val-break.js b/test/language/identifiers/val-break.js new file mode 100644 index 0000000000..9c74c49ded --- /dev/null +++ b/test/language/identifiers/val-break.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var break = 123;; diff --git a/test/language/identifiers/val-case-via-escape-hex.js b/test/language/identifiers/val-case-via-escape-hex.js new file mode 100644 index 0000000000..e77de17887 --- /dev/null +++ b/test/language/identifiers/val-case-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: case +negative: SyntaxError +---*/ + +var \u{63}ase = 123; diff --git a/test/language/identifiers/7.6-5.js b/test/language/identifiers/val-case-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-5.js rename to test/language/identifiers/val-case-via-escape-hex4.js index abd717b0ce..1848fec9f6 100644 --- a/test/language/identifiers/7.6-5.js +++ b/test/language/identifiers/val-case-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-5 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: case (case) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0063ase = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0063ase = 123; diff --git a/test/language/identifiers/val-case.js b/test/language/identifiers/val-case.js new file mode 100644 index 0000000000..f933ccc3e6 --- /dev/null +++ b/test/language/identifiers/val-case.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var case = 123; diff --git a/test/language/identifiers/val-catch-via-escape-hex.js b/test/language/identifiers/val-catch-via-escape-hex.js new file mode 100644 index 0000000000..0858e6ffcb --- /dev/null +++ b/test/language/identifiers/val-catch-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: catch +negative: SyntaxError +---*/ + +var \u{63}atch = 123; diff --git a/test/language/identifiers/7.6-13.js b/test/language/identifiers/val-catch-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-13.js rename to test/language/identifiers/val-catch-via-escape-hex4.js index 0edd7bdd27..587d7903ee 100644 --- a/test/language/identifiers/7.6-13.js +++ b/test/language/identifiers/val-catch-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-13 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: catch (catch) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0063atch = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0063atch = 123; diff --git a/test/language/identifiers/val-catch.js b/test/language/identifiers/val-catch.js new file mode 100644 index 0000000000..242f54e590 --- /dev/null +++ b/test/language/identifiers/val-catch.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var catch = 123; diff --git a/test/language/identifiers/val-class-via-escape-hex.js b/test/language/identifiers/val-class-via-escape-hex.js new file mode 100644 index 0000000000..7a898910f8 --- /dev/null +++ b/test/language/identifiers/val-class-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: class +negative: SyntaxError +---*/ + +var cla\u{73}s = 123; diff --git a/test/language/identifiers/7.6-30.js b/test/language/identifiers/val-class-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-30.js rename to test/language/identifiers/val-class-via-escape-hex4.js index f0b0db6520..90022e3b4f 100644 --- a/test/language/identifiers/7.6-30.js +++ b/test/language/identifiers/val-class-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-30 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: class (class) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var cla\u0073s = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var cla\u0073s = 123; diff --git a/test/language/identifiers/val-class.js b/test/language/identifiers/val-class.js new file mode 100644 index 0000000000..c2a65f53a9 --- /dev/null +++ b/test/language/identifiers/val-class.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var class = 123; diff --git a/test/language/identifiers/val-const-via-escape-hex.js b/test/language/identifiers/val-const-via-escape-hex.js new file mode 100644 index 0000000000..5c8c2f610d --- /dev/null +++ b/test/language/identifiers/val-const-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: const +negative: SyntaxError +---*/ + +var co\u{6e}st = 123; diff --git a/test/language/identifiers/7.6-34.js b/test/language/identifiers/val-const-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-34.js rename to test/language/identifiers/val-const-via-escape-hex4.js index e717ab6906..f1492690c0 100644 --- a/test/language/identifiers/7.6-34.js +++ b/test/language/identifiers/val-const-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-34 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: const (const) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var co\u006est = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var co\u006est = 123; diff --git a/test/language/identifiers/val-const.js b/test/language/identifiers/val-const.js new file mode 100644 index 0000000000..31fd2667c3 --- /dev/null +++ b/test/language/identifiers/val-const.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var const = 123; diff --git a/test/language/identifiers/val-continue-via-escape-hex.js b/test/language/identifiers/val-continue-via-escape-hex.js new file mode 100644 index 0000000000..4cf218f069 --- /dev/null +++ b/test/language/identifiers/val-continue-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: continue +negative: SyntaxError +---*/ + +var \u{63}ontinue = 123; diff --git a/test/language/identifiers/7.6-17.js b/test/language/identifiers/val-continue-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-17.js rename to test/language/identifiers/val-continue-via-escape-hex4.js index b84fcdec2c..b786d357c8 100644 --- a/test/language/identifiers/7.6-17.js +++ b/test/language/identifiers/val-continue-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-17 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: continue (continue) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0063ontinue = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0063ontinue = 123; diff --git a/test/language/identifiers/val-continue.js b/test/language/identifiers/val-continue.js new file mode 100644 index 0000000000..81babe568f --- /dev/null +++ b/test/language/identifiers/val-continue.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var continue = 123; diff --git a/test/language/identifiers/val-debugger-via-escape-hex.js b/test/language/identifiers/val-debugger-via-escape-hex.js new file mode 100644 index 0000000000..827594d336 --- /dev/null +++ b/test/language/identifiers/val-debugger-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: debugger +negative: SyntaxError +---*/ + +var \u{64}ebugger = 123; diff --git a/test/language/identifiers/7.6-21.js b/test/language/identifiers/val-debugger-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-21.js rename to test/language/identifiers/val-debugger-via-escape-hex4.js index 0086e5de21..7fb2d4a616 100644 --- a/test/language/identifiers/7.6-21.js +++ b/test/language/identifiers/val-debugger-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-21 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: debugger (debugger) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0064ebugger = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0064ebugger = 123; diff --git a/test/language/identifiers/val-debugger.js b/test/language/identifiers/val-debugger.js new file mode 100644 index 0000000000..a0bf31d18a --- /dev/null +++ b/test/language/identifiers/val-debugger.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var debugger = 123; diff --git a/test/language/identifiers/val-default-via-escape-hex.js b/test/language/identifiers/val-default-via-escape-hex.js new file mode 100644 index 0000000000..190b572d30 --- /dev/null +++ b/test/language/identifiers/val-default-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: default +negative: SyntaxError +---*/ + +var def\u{61}ult = 123; diff --git a/test/language/identifiers/7.6-26.js b/test/language/identifiers/val-default-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-26.js rename to test/language/identifiers/val-default-via-escape-hex4.js index ebe6f65cf1..2598d90a78 100644 --- a/test/language/identifiers/7.6-26.js +++ b/test/language/identifiers/val-default-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-26 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: default (default) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var def\u0061ult = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var def\u0061ult = 123; diff --git a/test/language/identifiers/val-default.js b/test/language/identifiers/val-default.js new file mode 100644 index 0000000000..f1445dc79d --- /dev/null +++ b/test/language/identifiers/val-default.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var default = 123; diff --git a/test/language/identifiers/val-delete-via-escape-hex.js b/test/language/identifiers/val-delete-via-escape-hex.js new file mode 100644 index 0000000000..60657d1030 --- /dev/null +++ b/test/language/identifiers/val-delete-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: delete +negative: SyntaxError +---*/ + +var \u{64}elete = 123; diff --git a/test/language/identifiers/7.6-29.js b/test/language/identifiers/val-delete-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-29.js rename to test/language/identifiers/val-delete-via-escape-hex4.js index 69aea9c9f1..686a12d4c8 100644 --- a/test/language/identifiers/7.6-29.js +++ b/test/language/identifiers/val-delete-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-29 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: delete (delete) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0064elete = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0064elete = 123; diff --git a/test/language/identifiers/val-delete.js b/test/language/identifiers/val-delete.js new file mode 100644 index 0000000000..32e7927a29 --- /dev/null +++ b/test/language/identifiers/val-delete.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var delete = 123; diff --git a/test/language/identifiers/val-do-via-escape-hex.js b/test/language/identifiers/val-do-via-escape-hex.js new file mode 100644 index 0000000000..88d7490e1a --- /dev/null +++ b/test/language/identifiers/val-do-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: do +negative: SyntaxError +---*/ + +var \u{64}\u{6f} = 123; diff --git a/test/language/identifiers/7.6-8.js b/test/language/identifiers/val-do-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-8.js rename to test/language/identifiers/val-do-via-escape-hex4.js index cbc63f1c29..359de1c82d 100644 --- a/test/language/identifiers/7.6-8.js +++ b/test/language/identifiers/val-do-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-8 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: do (do) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0064\u006f = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0064\u006f = 123; diff --git a/test/language/identifiers/val-do.js b/test/language/identifiers/val-do.js new file mode 100644 index 0000000000..8d920c49e5 --- /dev/null +++ b/test/language/identifiers/val-do.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var do = 123; diff --git a/test/language/identifiers/val-dollar-sign-via-escape-hex.js b/test/language/identifiers/val-dollar-sign-via-escape-hex.js new file mode 100644 index 0000000000..08d4c67fa7 --- /dev/null +++ b/test/language/identifiers/val-dollar-sign-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "IdentifierStart :: $" +es6id: 11.6 +description: The $ as unicode character \u{24} +---*/ + +var \u{24} = 1; + +assert.sameValue($, 1); diff --git a/test/language/identifiers/S7.6_A1.2_T2.js b/test/language/identifiers/val-dollar-sign-via-escape-hex4.js similarity index 75% rename from test/language/identifiers/S7.6_A1.2_T2.js rename to test/language/identifiers/val-dollar-sign-via-escape-hex4.js index 35a2feaba4..4e3e701d9e 100644 --- a/test/language/identifiers/S7.6_A1.2_T2.js +++ b/test/language/identifiers/val-dollar-sign-via-escape-hex4.js @@ -7,8 +7,6 @@ es5id: 7.6_A1.2_T2 description: The $ as unicode character \u0024 ---*/ -//CHECK#1 var \u0024 = 1; -if ($ !== 1) { - $ERROR('#1: var \\u0024 = 1; $ === 1. Actual: ' + ($)); -} + +assert.sameValue($, 1); diff --git a/test/language/identifiers/S7.6_A1.2_T1.js b/test/language/identifiers/val-dollar-sign.js similarity index 78% rename from test/language/identifiers/S7.6_A1.2_T1.js rename to test/language/identifiers/val-dollar-sign.js index 8d394e2ff3..9795258293 100644 --- a/test/language/identifiers/S7.6_A1.2_T1.js +++ b/test/language/identifiers/val-dollar-sign.js @@ -9,6 +9,5 @@ description: Create variable $ //CHECK#1 var $ = 1; -if ($ !== 1) { - $ERROR('#1: var $ = 1; $ === 1. Actual: ' + ($)); -} + +assert.sameValue($, 1); diff --git a/test/language/identifiers/val-else-via-escape-hex.js b/test/language/identifiers/val-else-via-escape-hex.js new file mode 100644 index 0000000000..52dcfcebfc --- /dev/null +++ b/test/language/identifiers/val-else-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: else (else) +negative: SyntaxError +---*/ + +var \u{65}lse = 123; diff --git a/test/language/identifiers/7.6-9.js b/test/language/identifiers/val-else-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-9.js rename to test/language/identifiers/val-else-via-escape-hex4.js index ffb6b9ec4c..5fb67949f5 100644 --- a/test/language/identifiers/7.6-9.js +++ b/test/language/identifiers/val-else-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-9 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: else (else) (null) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0065lse = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0065lse = 123; diff --git a/test/language/identifiers/val-else.js b/test/language/identifiers/val-else.js new file mode 100644 index 0000000000..b09b1258f6 --- /dev/null +++ b/test/language/identifiers/val-else.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var else = 123; diff --git a/test/language/identifiers/val-enum-via-escape-hex.js b/test/language/identifiers/val-enum-via-escape-hex.js new file mode 100644 index 0000000000..e7abb7e083 --- /dev/null +++ b/test/language/identifiers/val-enum-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: enum +negative: SyntaxError +---*/ + +var \u{65}\u{6e}\u{75}\u{6d} = 123; diff --git a/test/language/identifiers/7.6-32.js b/test/language/identifiers/val-enum-via-escape-hex4.js similarity index 63% rename from test/language/identifiers/7.6-32.js rename to test/language/identifiers/val-enum-via-escape-hex4.js index 702fb37af6..722532ffd1 100644 --- a/test/language/identifiers/7.6-32.js +++ b/test/language/identifiers/val-enum-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-32 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: enum (enum) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0065\u006e\u0075\u006d = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0065\u006e\u0075\u006d = 123; diff --git a/test/language/identifiers/val-enum.js b/test/language/identifiers/val-enum.js new file mode 100644 index 0000000000..d0c20f47ec --- /dev/null +++ b/test/language/identifiers/val-enum.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var enum = 123; diff --git a/test/language/identifiers/val-export-via-escape-hex.js b/test/language/identifiers/val-export-via-escape-hex.js new file mode 100644 index 0000000000..93eb5e2337 --- /dev/null +++ b/test/language/identifiers/val-export-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: export +negative: SyntaxError +---*/ + +var expor\u{74} = 123; diff --git a/test/language/identifiers/7.6-35.js b/test/language/identifiers/val-export-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-35.js rename to test/language/identifiers/val-export-via-escape-hex4.js index c76d210f13..199123ad98 100644 --- a/test/language/identifiers/7.6-35.js +++ b/test/language/identifiers/val-export-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-35 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: export (export) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var expor\u0074 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var expor\u0074 = 123; diff --git a/test/language/identifiers/val-export.js b/test/language/identifiers/val-export.js new file mode 100644 index 0000000000..0607161a24 --- /dev/null +++ b/test/language/identifiers/val-export.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var export = 123; diff --git a/test/language/identifiers/val-extends-via-escape-hex.js b/test/language/identifiers/val-extends-via-escape-hex.js new file mode 100644 index 0000000000..6ff25420b8 --- /dev/null +++ b/test/language/identifiers/val-extends-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: extends +negative: SyntaxError +---*/ + +var extend\u{73} = 123; diff --git a/test/language/identifiers/7.6-31.js b/test/language/identifiers/val-extends-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-31.js rename to test/language/identifiers/val-extends-via-escape-hex4.js index 82e42ed75d..8b37006219 100644 --- a/test/language/identifiers/7.6-31.js +++ b/test/language/identifiers/val-extends-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-31 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: extends (extends) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var extend\u0073 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var extend\u0073 = 123; diff --git a/test/language/identifiers/val-extends.js b/test/language/identifiers/val-extends.js new file mode 100644 index 0000000000..92e0a0e9fe --- /dev/null +++ b/test/language/identifiers/val-extends.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var extends = 123; diff --git a/test/language/identifiers/val-false-via-escape-hex.js b/test/language/identifiers/val-false-via-escape-hex.js new file mode 100644 index 0000000000..023b3f4ea9 --- /dev/null +++ b/test/language/identifiers/val-false-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: false +negative: SyntaxError +---*/ + +var fals\u{65} = 123; diff --git a/test/language/identifiers/7.6-3.js b/test/language/identifiers/val-false-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-3.js rename to test/language/identifiers/val-false-via-escape-hex4.js index 62f96c3dcd..5830acc8b7 100644 --- a/test/language/identifiers/7.6-3.js +++ b/test/language/identifiers/val-false-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-3 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: false (false) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var fals\u0065 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var fals\u0065 = 123; diff --git a/test/language/identifiers/val-false.js b/test/language/identifiers/val-false.js new file mode 100644 index 0000000000..a7d967813d --- /dev/null +++ b/test/language/identifiers/val-false.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var false = 123; diff --git a/test/language/identifiers/val-finally-via-escape-hex.js b/test/language/identifiers/val-finally-via-escape-hex.js new file mode 100644 index 0000000000..4cf0ebc377 --- /dev/null +++ b/test/language/identifiers/val-finally-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: finally +negative: SyntaxError +---*/ + +var fina\u{6c}ly = 123; diff --git a/test/language/identifiers/7.6-14.js b/test/language/identifiers/val-finally-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-14.js rename to test/language/identifiers/val-finally-via-escape-hex4.js index 48d3d1f2b5..a6bd6a85d1 100644 --- a/test/language/identifiers/7.6-14.js +++ b/test/language/identifiers/val-finally-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-14 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: finally (finally) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var fina\u006cly = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var fina\u006cly = 123; diff --git a/test/language/identifiers/val-finally.js b/test/language/identifiers/val-finally.js new file mode 100644 index 0000000000..7e3851b837 --- /dev/null +++ b/test/language/identifiers/val-finally.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var finally = 123; diff --git a/test/language/identifiers/val-for-via-escape-hex.js b/test/language/identifiers/val-for-via-escape-hex.js new file mode 100644 index 0000000000..06054e460d --- /dev/null +++ b/test/language/identifiers/val-for-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: for +negative: SyntaxError +---*/ + +var f\u{6f}r = 123; diff --git a/test/language/identifiers/7.6-18.js b/test/language/identifiers/val-for-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-18.js rename to test/language/identifiers/val-for-via-escape-hex4.js index 8dd3558977..5958770e2b 100644 --- a/test/language/identifiers/7.6-18.js +++ b/test/language/identifiers/val-for-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-18 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: for (for) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var f\u006fr = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var f\u006fr = 123; diff --git a/test/language/identifiers/val-for.js b/test/language/identifiers/val-for.js new file mode 100644 index 0000000000..16a19a1d59 --- /dev/null +++ b/test/language/identifiers/val-for.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var for = 123; diff --git a/test/language/identifiers/val-function-via-escape-hex.js b/test/language/identifiers/val-function-via-escape-hex.js new file mode 100644 index 0000000000..01bc16a2a9 --- /dev/null +++ b/test/language/identifiers/val-function-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: function +negative: SyntaxError +---*/ + +var func\u{74}ion = 123; diff --git a/test/language/identifiers/7.6-22.js b/test/language/identifiers/val-function-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-22.js rename to test/language/identifiers/val-function-via-escape-hex4.js index f2d6faa371..928cf0d36b 100644 --- a/test/language/identifiers/7.6-22.js +++ b/test/language/identifiers/val-function-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-22 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: function (function) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var func\u0074ion = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var func\u0074ion = 123; diff --git a/test/language/identifiers/val-function.js b/test/language/identifiers/val-function.js new file mode 100644 index 0000000000..dc846ee8b4 --- /dev/null +++ b/test/language/identifiers/val-function.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var function = 123; diff --git a/test/language/identifiers/val-if-via-escape-hex.js b/test/language/identifiers/val-if-via-escape-hex.js new file mode 100644 index 0000000000..ae3d116006 --- /dev/null +++ b/test/language/identifiers/val-if-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: if +negative: SyntaxError +---*/ + +var \u{69}\u{66} = 123; diff --git a/test/language/identifiers/7.6-24.js b/test/language/identifiers/val-if-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-24.js rename to test/language/identifiers/val-if-via-escape-hex4.js index bcc94ee405..206370090f 100644 --- a/test/language/identifiers/7.6-24.js +++ b/test/language/identifiers/val-if-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-24 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: if (if) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0069\u0066 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0069\u0066 = 123; diff --git a/test/language/identifiers/val-if.js b/test/language/identifiers/val-if.js new file mode 100644 index 0000000000..1ad3c2fcce --- /dev/null +++ b/test/language/identifiers/val-if.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var if = 123; diff --git a/test/language/identifiers/val-import-via-escape-hex.js b/test/language/identifiers/val-import-via-escape-hex.js new file mode 100644 index 0000000000..637b78051d --- /dev/null +++ b/test/language/identifiers/val-import-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: import +negative: SyntaxError +---*/ + +var \u{69}\u{6d}\u{70}\u{6f}\u{72}\u{74} = 123; diff --git a/test/language/identifiers/7.6-36.js b/test/language/identifiers/val-import-via-escape-hex4.js similarity index 63% rename from test/language/identifiers/7.6-36.js rename to test/language/identifiers/val-import-via-escape-hex4.js index bddefcc214..c8cd74ae7b 100644 --- a/test/language/identifiers/7.6-36.js +++ b/test/language/identifiers/val-import-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-36 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: import (import) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0069\u006d\u0070\u006f\u0072\u0074 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0069\u006d\u0070\u006f\u0072\u0074 = 123; diff --git a/test/language/identifiers/val-import.js b/test/language/identifiers/val-import.js new file mode 100644 index 0000000000..6e4884aa6d --- /dev/null +++ b/test/language/identifiers/val-import.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var import = 123; diff --git a/test/language/identifiers/val-in-via-escape-hex.js b/test/language/identifiers/val-in-via-escape-hex.js new file mode 100644 index 0000000000..ac41b788ea --- /dev/null +++ b/test/language/identifiers/val-in-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: in +negative: SyntaxError +---*/ + +var \u{69}\u{6e} = 123; diff --git a/test/language/identifiers/7.6-28.js b/test/language/identifiers/val-in-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-28.js rename to test/language/identifiers/val-in-via-escape-hex4.js index 2e76d06268..5179a2d967 100644 --- a/test/language/identifiers/7.6-28.js +++ b/test/language/identifiers/val-in-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-28 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: in (in) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0069\u006e = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0069\u006e = 123; diff --git a/test/language/identifiers/val-in.js b/test/language/identifiers/val-in.js new file mode 100644 index 0000000000..2eb40fa68e --- /dev/null +++ b/test/language/identifiers/val-in.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var in = 123; diff --git a/test/language/identifiers/val-instanceof-via-escape-hex.js b/test/language/identifiers/val-instanceof-via-escape-hex.js new file mode 100644 index 0000000000..9bcacaeff1 --- /dev/null +++ b/test/language/identifiers/val-instanceof-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: instanceof +negative: SyntaxError +---*/ + +var insta\u{6e}ceof = 123; diff --git a/test/language/identifiers/7.6-6.js b/test/language/identifiers/val-instanceof-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-6.js rename to test/language/identifiers/val-instanceof-via-escape-hex4.js index e453cde819..ebe0ae6079 100644 --- a/test/language/identifiers/7.6-6.js +++ b/test/language/identifiers/val-instanceof-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-6 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: instanceof (instanceof) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var insta\u006eceof = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var insta\u006eceof = 123; diff --git a/test/language/identifiers/val-instanceof.js b/test/language/identifiers/val-instanceof.js new file mode 100644 index 0000000000..d0f63c7335 --- /dev/null +++ b/test/language/identifiers/val-instanceof.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var instanceof = 123; diff --git a/test/language/identifiers/val-new-via-escape-hex.js b/test/language/identifiers/val-new-via-escape-hex.js new file mode 100644 index 0000000000..1e6993a48c --- /dev/null +++ b/test/language/identifiers/val-new-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: new +negative: SyntaxError +---*/ + +var n\u{65}w = 123; diff --git a/test/language/identifiers/7.6-10.js b/test/language/identifiers/val-new-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-10.js rename to test/language/identifiers/val-new-via-escape-hex4.js index f71bfef999..20c7741426 100644 --- a/test/language/identifiers/7.6-10.js +++ b/test/language/identifiers/val-new-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-10 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: new (new) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var n\u0065w = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var n\u0065w = 123; diff --git a/test/language/identifiers/val-new.js b/test/language/identifiers/val-new.js new file mode 100644 index 0000000000..2afd03c42d --- /dev/null +++ b/test/language/identifiers/val-new.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var new = 123; diff --git a/test/language/identifiers/val-null-via-escape-hex.js b/test/language/identifiers/val-null-via-escape-hex.js new file mode 100644 index 0000000000..c3d02bc6ad --- /dev/null +++ b/test/language/identifiers/val-null-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: null +negative: SyntaxError +---*/ + +var \u{6e}ull = 123; diff --git a/test/language/identifiers/7.6-1.js b/test/language/identifiers/val-null-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-1.js rename to test/language/identifiers/val-null-via-escape-hex4.js index 2e880a7f9e..03067daac2 100644 --- a/test/language/identifiers/7.6-1.js +++ b/test/language/identifiers/val-null-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-1 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: null (null) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u006eull = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u006eull = 123; diff --git a/test/language/identifiers/val-null.js b/test/language/identifiers/val-null.js new file mode 100644 index 0000000000..c4ddd797c6 --- /dev/null +++ b/test/language/identifiers/val-null.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var null = 123; diff --git a/test/language/identifiers/val-return-via-escape-hex.js b/test/language/identifiers/val-return-via-escape-hex.js new file mode 100644 index 0000000000..d7f7817a7f --- /dev/null +++ b/test/language/identifiers/val-return-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: return +negative: SyntaxError +---*/ + +var retur\u{6e} = 123; diff --git a/test/language/identifiers/7.6-15.js b/test/language/identifiers/val-return-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-15.js rename to test/language/identifiers/val-return-via-escape-hex4.js index 48a73cf5ff..e6efec8e5a 100644 --- a/test/language/identifiers/7.6-15.js +++ b/test/language/identifiers/val-return-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-15 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: return (return) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var retur\u006e = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var retur\u006e = 123; diff --git a/test/language/identifiers/val-return.js b/test/language/identifiers/val-return.js new file mode 100644 index 0000000000..b8ba3caa65 --- /dev/null +++ b/test/language/identifiers/val-return.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var return = 123; diff --git a/test/language/identifiers/val-super-via-escape-hex.js b/test/language/identifiers/val-super-via-escape-hex.js new file mode 100644 index 0000000000..c22b9dfaab --- /dev/null +++ b/test/language/identifiers/val-super-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: super +negative: SyntaxError +---*/ + +var \u{73}uper = 123; diff --git a/test/language/identifiers/7.6-33.js b/test/language/identifiers/val-super-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-33.js rename to test/language/identifiers/val-super-via-escape-hex4.js index 8966b033da..d4c559fd05 100644 --- a/test/language/identifiers/7.6-33.js +++ b/test/language/identifiers/val-super-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-33 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: super (super) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0073uper = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0073uper = 123; diff --git a/test/language/identifiers/val-super.js b/test/language/identifiers/val-super.js new file mode 100644 index 0000000000..009e67f5d6 --- /dev/null +++ b/test/language/identifiers/val-super.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var super = 123; diff --git a/test/language/identifiers/val-switch-via-escape-hex.js b/test/language/identifiers/val-switch-via-escape-hex.js new file mode 100644 index 0000000000..c864f29866 --- /dev/null +++ b/test/language/identifiers/val-switch-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: switch +negative: SyntaxError +---*/ + +var switc\u{68} = 123; diff --git a/test/language/identifiers/7.6-19.js b/test/language/identifiers/val-switch-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-19.js rename to test/language/identifiers/val-switch-via-escape-hex4.js index 2cc61b4ddc..9ec21adeca 100644 --- a/test/language/identifiers/7.6-19.js +++ b/test/language/identifiers/val-switch-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-19 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: switch (switch) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var switc\u0068 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var switc\u0068 = 123; diff --git a/test/language/identifiers/val-switch.js b/test/language/identifiers/val-switch.js new file mode 100644 index 0000000000..b505ea1ff8 --- /dev/null +++ b/test/language/identifiers/val-switch.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var switch = 123; diff --git a/test/language/identifiers/val-this-via-escape-hex.js b/test/language/identifiers/val-this-via-escape-hex.js new file mode 100644 index 0000000000..b1816dc0a4 --- /dev/null +++ b/test/language/identifiers/val-this-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: this +negative: SyntaxError +---*/ + +var thi\u{73} = 123; diff --git a/test/language/identifiers/7.6-23.js b/test/language/identifiers/val-this-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-23.js rename to test/language/identifiers/val-this-via-escape-hex4.js index 7214daa065..a539b69bce 100644 --- a/test/language/identifiers/7.6-23.js +++ b/test/language/identifiers/val-this-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-23 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: this (this) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var thi\u0073 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var thi\u0073 = 123; diff --git a/test/language/identifiers/val-this.js b/test/language/identifiers/val-this.js new file mode 100644 index 0000000000..71dc283266 --- /dev/null +++ b/test/language/identifiers/val-this.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var this = 123; diff --git a/test/language/identifiers/val-throw-via-escape-hex.js b/test/language/identifiers/val-throw-via-escape-hex.js new file mode 100644 index 0000000000..978c13af78 --- /dev/null +++ b/test/language/identifiers/val-throw-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: throw +negative: SyntaxError +---*/ + +var thro\u{77} = 123; diff --git a/test/language/identifiers/7.6-27.js b/test/language/identifiers/val-throw-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-27.js rename to test/language/identifiers/val-throw-via-escape-hex4.js index 2a5843db32..a47e700715 100644 --- a/test/language/identifiers/7.6-27.js +++ b/test/language/identifiers/val-throw-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-27 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: throw (throw) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var thro\u0077 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var thro\u0077 = 123; diff --git a/test/language/identifiers/val-throw.js b/test/language/identifiers/val-throw.js new file mode 100644 index 0000000000..3c5758e12c --- /dev/null +++ b/test/language/identifiers/val-throw.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var throw = 123; diff --git a/test/language/identifiers/val-true-via-escape-hex.js b/test/language/identifiers/val-true-via-escape-hex.js new file mode 100644 index 0000000000..7aa9228d9f --- /dev/null +++ b/test/language/identifiers/val-true-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: true +negative: SyntaxError +---*/ + +var tr\u{75}e = 123; diff --git a/test/language/identifiers/7.6-2.js b/test/language/identifiers/val-true-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-2.js rename to test/language/identifiers/val-true-via-escape-hex4.js index 48ef2d1cff..b4c14e0fe1 100644 --- a/test/language/identifiers/7.6-2.js +++ b/test/language/identifiers/val-true-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-2 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: true (true) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var tr\u0075e = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var tr\u0075e = 123; diff --git a/test/language/identifiers/val-true.js b/test/language/identifiers/val-true.js new file mode 100644 index 0000000000..2df3fbb7f5 --- /dev/null +++ b/test/language/identifiers/val-true.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var true = 123; diff --git a/test/language/identifiers/val-try-via-escape-hex.js b/test/language/identifiers/val-try-via-escape-hex.js new file mode 100644 index 0000000000..da6c463984 --- /dev/null +++ b/test/language/identifiers/val-try-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: try +negative: SyntaxError +---*/ + +var \u{74}\u{72}\u{79} = 123; diff --git a/test/language/identifiers/7.6-12.js b/test/language/identifiers/val-try-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-12.js rename to test/language/identifiers/val-try-via-escape-hex4.js index cade0f5add..77eeecb9a2 100644 --- a/test/language/identifiers/7.6-12.js +++ b/test/language/identifiers/val-try-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-12 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: try (try) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0074\u0072\u0079 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0074\u0072\u0079 = 123; diff --git a/test/language/identifiers/val-try.js b/test/language/identifiers/val-try.js new file mode 100644 index 0000000000..aa5ff65887 --- /dev/null +++ b/test/language/identifiers/val-try.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var try = 123; diff --git a/test/language/identifiers/val-typeof-via-escape-hex.js b/test/language/identifiers/val-typeof-via-escape-hex.js new file mode 100644 index 0000000000..7069490e4f --- /dev/null +++ b/test/language/identifiers/val-typeof-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: typeof +negative: SyntaxError +---*/ + +var typeo\u{66} = 123; diff --git a/test/language/identifiers/7.6-7.js b/test/language/identifiers/val-typeof-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-7.js rename to test/language/identifiers/val-typeof-via-escape-hex4.js index 688c56c67c..b189b32853 100644 --- a/test/language/identifiers/7.6-7.js +++ b/test/language/identifiers/val-typeof-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-7 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: typeof (typeof) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var typeo\u0066 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var typeo\u0066 = 123; diff --git a/test/language/identifiers/val-typeof.js b/test/language/identifiers/val-typeof.js new file mode 100644 index 0000000000..02c3a81ff1 --- /dev/null +++ b/test/language/identifiers/val-typeof.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var typeof = 123; diff --git a/test/language/identifiers/val-underscore-via-escape-hex.js b/test/language/identifiers/val-underscore-via-escape-hex.js new file mode 100644 index 0000000000..62c358aeb6 --- /dev/null +++ b/test/language/identifiers/val-underscore-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: "IdentifierStart :: _" +es6id: 11.6 +description: The _ as unicode character \u{5F} +---*/ + +var \u{5F} = 1; + +assert.sameValue(_, 1); diff --git a/test/language/identifiers/S7.6_A1.3_T2.js b/test/language/identifiers/val-underscore-via-escape-hex4.js similarity index 75% rename from test/language/identifiers/S7.6_A1.3_T2.js rename to test/language/identifiers/val-underscore-via-escape-hex4.js index 5fa8097a03..23dbe11c99 100644 --- a/test/language/identifiers/S7.6_A1.3_T2.js +++ b/test/language/identifiers/val-underscore-via-escape-hex4.js @@ -7,8 +7,6 @@ es5id: 7.6_A1.3_T2 description: The _ as unicode character \u005F ---*/ -//CHECK#1 var \u005F = 1; -if (_ !== 1) { - $ERROR('#1: var \\u005F = 1; _ === 1. Actual: ' + (_)); -} + +assert.sameValue(_, 1); diff --git a/test/language/identifiers/S7.6_A1.3_T1.js b/test/language/identifiers/val-underscore.js similarity index 78% rename from test/language/identifiers/S7.6_A1.3_T1.js rename to test/language/identifiers/val-underscore.js index 1c87bc4bfd..19f04879f0 100644 --- a/test/language/identifiers/S7.6_A1.3_T1.js +++ b/test/language/identifiers/val-underscore.js @@ -9,6 +9,5 @@ description: Create variable _ //CHECK#1 var _ = 1; -if (_ !== 1) { - $ERROR('#1: var _ = 1; _ === 1. Actual: ' + (_)); -} + +assert.sameValue(_, 1); diff --git a/test/language/identifiers/val-var-via-escape-hex.js b/test/language/identifiers/val-var-via-escape-hex.js new file mode 100644 index 0000000000..4e9c22d464 --- /dev/null +++ b/test/language/identifiers/val-var-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: var +negative: SyntaxError +---*/ + +var va\u{72} = 123; diff --git a/test/language/identifiers/7.6-11.js b/test/language/identifiers/val-var-via-escape-hex4.js similarity index 64% rename from test/language/identifiers/7.6-11.js rename to test/language/identifiers/val-var-via-escape-hex4.js index 0c11b293dc..81b04bbc9d 100644 --- a/test/language/identifiers/7.6-11.js +++ b/test/language/identifiers/val-var-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-11 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: var (var) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var va\u0072 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var va\u0072 = 123; diff --git a/test/language/identifiers/val-var.js b/test/language/identifiers/val-var.js new file mode 100644 index 0000000000..1bed4ca170 --- /dev/null +++ b/test/language/identifiers/val-var.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var var = 123; diff --git a/test/language/identifiers/val-void-via-escape-hex.js b/test/language/identifiers/val-void-via-escape-hex.js new file mode 100644 index 0000000000..126def5114 --- /dev/null +++ b/test/language/identifiers/val-void-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: void +negative: SyntaxError +---*/ + +var \u{76}\u{6f}\u{69}\u{64} = 123; diff --git a/test/language/identifiers/7.6-16.js b/test/language/identifiers/val-void-via-escape-hex4.js similarity index 63% rename from test/language/identifiers/7.6-16.js rename to test/language/identifiers/val-void-via-escape-hex4.js index e035ec762b..06e7d27879 100644 --- a/test/language/identifiers/7.6-16.js +++ b/test/language/identifiers/val-void-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-16 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: void (void) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0076\u006f\u0069\u0064 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0076\u006f\u0069\u0064 = 123; diff --git a/test/language/identifiers/val-void.js b/test/language/identifiers/val-void.js new file mode 100644 index 0000000000..6260522a3b --- /dev/null +++ b/test/language/identifiers/val-void.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var void = 123; diff --git a/test/language/identifiers/val-while-via-escape-hex.js b/test/language/identifiers/val-while-via-escape-hex.js new file mode 100644 index 0000000000..86d90e217a --- /dev/null +++ b/test/language/identifiers/val-while-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: while +negative: SyntaxError +---*/ + +var \u{77}\u{68}\u{69}\u{6c}\u{65} = 123; diff --git a/test/language/identifiers/7.6-20.js b/test/language/identifiers/val-while-via-escape-hex4.js similarity index 63% rename from test/language/identifiers/7.6-20.js rename to test/language/identifiers/val-while-via-escape-hex4.js index 55269c90f1..ab2078c582 100644 --- a/test/language/identifiers/7.6-20.js +++ b/test/language/identifiers/val-while-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-20 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: while (while) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0077\u0068\u0069\u006c\u0065 = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0077\u0068\u0069\u006c\u0065 = 123; diff --git a/test/language/identifiers/val-while.js b/test/language/identifiers/val-while.js new file mode 100644 index 0000000000..3a1a0e506a --- /dev/null +++ b/test/language/identifiers/val-while.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var while = 123; diff --git a/test/language/identifiers/val-with-via-escape-hex.js b/test/language/identifiers/val-with-via-escape-hex.js new file mode 100644 index 0000000000..d3b4cdd815 --- /dev/null +++ b/test/language/identifiers/val-with-via-escape-hex.js @@ -0,0 +1,12 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier + Names in UTF8: with +negative: SyntaxError +---*/ + +var \u{77}ith = 123; diff --git a/test/language/identifiers/7.6-25.js b/test/language/identifiers/val-with-via-escape-hex4.js similarity index 65% rename from test/language/identifiers/7.6-25.js rename to test/language/identifiers/val-with-via-escape-hex4.js index c0392ccc4b..78f89c141d 100644 --- a/test/language/identifiers/7.6-25.js +++ b/test/language/identifiers/val-with-via-escape-hex4.js @@ -9,15 +9,7 @@ es5id: 7.6-25 description: > 7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: with (with) -includes: [runTestCase.js] +negative: SyntaxError ---*/ -function testcase() { - try { - eval("var \u0077ith = 123;"); - return false; - } catch (e) { - return e instanceof SyntaxError; - } - } -runTestCase(testcase); +var \u0077ith = 123; diff --git a/test/language/identifiers/val-with.js b/test/language/identifiers/val-with.js new file mode 100644 index 0000000000..43b6970694 --- /dev/null +++ b/test/language/identifiers/val-with.js @@ -0,0 +1,11 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 11.6 +description: > + SyntaxError expected: reserved words used as Identifier +negative: SyntaxError +---*/ + +var with = 123; diff --git a/test/language/identifiers/yield-as-binding-identifier-in-strict.js b/test/language/identifiers/val-yield-strict.js similarity index 100% rename from test/language/identifiers/yield-as-binding-identifier-in-strict.js rename to test/language/identifiers/val-yield-strict.js diff --git a/test/language/identifiers/vals-eng-alpha-lower-via-escape-hex.js b/test/language/identifiers/vals-eng-alpha-lower-via-escape-hex.js new file mode 100644 index 0000000000..d94f1d4352 --- /dev/null +++ b/test/language/identifiers/vals-eng-alpha-lower-via-escape-hex.js @@ -0,0 +1,86 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es6id: 11.6 +description: Check ENGLISH SMALL ALPHABET +---*/ + +var \u{61} = 1; +assert.sameValue(a, 1); + +var \u{62} = 1; +assert.sameValue(b, 1); + +var \u{63} = 1; +assert.sameValue(c, 1); + +var \u{64} = 1; +assert.sameValue(d, 1); + +var \u{65} = 1; +assert.sameValue(e, 1); + +var \u{66} = 1; +assert.sameValue(f, 1); + +var \u{67} = 1; +assert.sameValue(g, 1); + +var \u{68} = 1; +assert.sameValue(h, 1); + +var \u{69} = 1; +assert.sameValue(i, 1); + +var \u{6A} = 1; +assert.sameValue(j, 1); + +var \u{6B} = 1; +assert.sameValue(k, 1); + +var \u{6C} = 1; +assert.sameValue(l, 1); + +var \u{6D} = 1; +assert.sameValue(m, 1); + +var \u{6E} = 1; +assert.sameValue(n, 1); + +var \u{6F} = 1; +assert.sameValue(o, 1); + +var \u{70} = 1; +assert.sameValue(p, 1); + +var \u{71} = 1; +assert.sameValue(q, 1); + +var \u{72} = 1; +assert.sameValue(r, 1); + +var \u{73} = 1; +assert.sameValue(s, 1); + +var \u{74} = 1; +assert.sameValue(t, 1); + +var \u{75} = 1; +assert.sameValue(u, 1); + +var \u{76} = 1; +assert.sameValue(v, 1); + +var \u{77} = 1; +assert.sameValue(w, 1); + +var \u{78} = 1; +assert.sameValue(x, 1); + +var \u{79} = 1; +assert.sameValue(y, 1); + +var \u{7A} = 1; +assert.sameValue(z, 1); diff --git a/test/language/identifiers/vals-eng-alpha-lower-via-escape-hex4.js b/test/language/identifiers/vals-eng-alpha-lower-via-escape-hex4.js new file mode 100644 index 0000000000..62b93a8c19 --- /dev/null +++ b/test/language/identifiers/vals-eng-alpha-lower-via-escape-hex4.js @@ -0,0 +1,86 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es5id: 7.6_A4.1_T2 +description: Check ENGLISH SMALL ALPHABET +---*/ + +var \u0061 = 1; +assert.sameValue(a, 1); + +var \u0062 = 1; +assert.sameValue(b, 1); + +var \u0063 = 1; +assert.sameValue(c, 1); + +var \u0064 = 1; +assert.sameValue(d, 1); + +var \u0065 = 1; +assert.sameValue(e, 1); + +var \u0066 = 1; +assert.sameValue(f, 1); + +var \u0067 = 1; +assert.sameValue(g, 1); + +var \u0068 = 1; +assert.sameValue(h, 1); + +var \u0069 = 1; +assert.sameValue(i, 1); + +var \u006A = 1; +assert.sameValue(j, 1); + +var \u006B = 1; +assert.sameValue(k, 1); + +var \u006C = 1; +assert.sameValue(l, 1); + +var \u006D = 1; +assert.sameValue(m, 1); + +var \u006E = 1; +assert.sameValue(n, 1); + +var \u006F = 1; +assert.sameValue(o, 1); + +var \u0070 = 1; +assert.sameValue(p, 1); + +var \u0071 = 1; +assert.sameValue(q, 1); + +var \u0072 = 1; +assert.sameValue(r, 1); + +var \u0073 = 1; +assert.sameValue(s, 1); + +var \u0074 = 1; +assert.sameValue(t, 1); + +var \u0075 = 1; +assert.sameValue(u, 1); + +var \u0076 = 1; +assert.sameValue(v, 1); + +var \u0077 = 1; +assert.sameValue(w, 1); + +var \u0078 = 1; +assert.sameValue(x, 1); + +var \u0079 = 1; +assert.sameValue(y, 1); + +var \u007A = 1; +assert.sameValue(z, 1); diff --git a/test/language/identifiers/S7.6_A4.1_T2.js b/test/language/identifiers/vals-eng-alpha-lower.js similarity index 67% rename from test/language/identifiers/S7.6_A4.1_T2.js rename to test/language/identifiers/vals-eng-alpha-lower.js index b20911eeff..e36c7a0e71 100644 --- a/test/language/identifiers/S7.6_A4.1_T2.js +++ b/test/language/identifiers/vals-eng-alpha-lower.js @@ -1,114 +1,113 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. +// Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: Correct interpretation of ENGLISH ALPHABET -es5id: 7.6_A4.1_T2 +es6id: 11.6 description: Check ENGLISH SMALL ALPHABET ---*/ -//CHECK#a-z -var \u0061 = 1; +var a = 1; if (a !== 1) { $ERROR('#a'); } -var \u0062 = 1; +var b = 1; if (b !== 1) { $ERROR('#b'); } -var \u0063 = 1; +var c = 1; if (c !== 1) { $ERROR('#c'); } -var \u0064 = 1; +var d = 1; if (d !== 1) { $ERROR('#d'); } -var \u0065 = 1; +var e = 1; if (e !== 1) { $ERROR('#e'); } -var \u0066 = 1; +var f = 1; if (f !== 1) { $ERROR('#f'); } -var \u0067 = 1; +var g = 1; if (g !== 1) { $ERROR('#g'); } -var \u0068 = 1; +var h = 1; if (h !== 1) { $ERROR('#h'); } -var \u0069 = 1; +var i = 1; if (i !== 1) { $ERROR('#i'); } -var \u006A = 1; +var j = 1; if (j !== 1) { $ERROR('#j'); } -var \u006B = 1; +var k = 1; if (k !== 1) { $ERROR('#k'); } -var \u006C = 1; +var l = 1; if (l !== 1) { $ERROR('#l'); } -var \u006D = 1; +var m = 1; if (m !== 1) { $ERROR('#m'); } -var \u006E = 1; +var n = 1; if (n !== 1) { $ERROR('#n'); } -var \u006F = 1; +var o = 1; if (o !== 1) { $ERROR('#o'); } -var \u0070 = 1; +var p = 1; if (p !== 1) { $ERROR('#p'); } -var \u0071 = 1; +var q = 1; if (q !== 1) { $ERROR('#q'); } -var \u0072 = 1; +var r = 1; if (r !== 1) { $ERROR('#r'); } -var \u0073 = 1; +var s = 1; if (s !== 1) { $ERROR('#s'); } -var \u0074 = 1; +var t = 1; if (t !== 1) { $ERROR('#t'); } -var \u0075 = 1; +var u = 1; if (u !== 1) { $ERROR('#u'); } -var \u0076 = 1; +var v = 1; if (v !== 1) { $ERROR('#v'); } -var \u0077 = 1; +var w = 1; if (w !== 1) { $ERROR('#w'); } -var \u0078 = 1; +var x = 1; if (x !== 1) { $ERROR('#x'); } -var \u0079 = 1; +var y = 1; if (y !== 1) { $ERROR('#y'); } -var \u007A = 1; +var z = 1; if (z !== 1) { $ERROR('#z'); } diff --git a/test/language/identifiers/vals-eng-alpha-upper-via-escape-hex.js b/test/language/identifiers/vals-eng-alpha-upper-via-escape-hex.js new file mode 100644 index 0000000000..55ad78d168 --- /dev/null +++ b/test/language/identifiers/vals-eng-alpha-upper-via-escape-hex.js @@ -0,0 +1,86 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es6id: 11.6 +description: Check ENGLISH CAPITAL ALPHABET +---*/ + +var \u{41} = 1; +assert.sameValue(A, 1); + +var \u{42} = 1; +assert.sameValue(B, 1); + +var \u{43} = 1; +assert.sameValue(C, 1); + +var \u{44} = 1; +assert.sameValue(D, 1); + +var \u{45} = 1; +assert.sameValue(E, 1); + +var \u{46} = 1; +assert.sameValue(F, 1); + +var \u{47} = 1; +assert.sameValue(G, 1); + +var \u{48} = 1; +assert.sameValue(H, 1); + +var \u{49} = 1; +assert.sameValue(I, 1); + +var \u{4A} = 1; +assert.sameValue(J, 1); + +var \u{4B} = 1; +assert.sameValue(K, 1); + +var \u{4C} = 1; +assert.sameValue(L, 1); + +var \u{4D} = 1; +assert.sameValue(M, 1); + +var \u{4E} = 1; +assert.sameValue(N, 1); + +var \u{4F} = 1; +assert.sameValue(O, 1); + +var \u{50} = 1; +assert.sameValue(P, 1); + +var \u{51} = 1; +assert.sameValue(Q, 1); + +var \u{52} = 1; +assert.sameValue(R, 1); + +var \u{53} = 1; +assert.sameValue(S, 1); + +var \u{54} = 1; +assert.sameValue(T, 1); + +var \u{55} = 1; +assert.sameValue(U, 1); + +var \u{56} = 1; +assert.sameValue(V, 1); + +var \u{57} = 1; +assert.sameValue(W, 1); + +var \u{58} = 1; +assert.sameValue(X, 1); + +var \u{59} = 1; +assert.sameValue(Y, 1); + +var \u{5A} = 1; +assert.sameValue(Z, 1); diff --git a/test/language/identifiers/vals-eng-alpha-upper-via-escape-hex4.js b/test/language/identifiers/vals-eng-alpha-upper-via-escape-hex4.js new file mode 100644 index 0000000000..20a55d49a0 --- /dev/null +++ b/test/language/identifiers/vals-eng-alpha-upper-via-escape-hex4.js @@ -0,0 +1,86 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es5id: 7.6_A4.1_T1 +description: Check ENGLISH CAPITAL ALPHABET +---*/ + +var \u0041 = 1; +assert.sameValue(A, 1); + +var \u0042 = 1; +assert.sameValue(B, 1); + +var \u0043 = 1; +assert.sameValue(C, 1); + +var \u0044 = 1; +assert.sameValue(D, 1); + +var \u0045 = 1; +assert.sameValue(E, 1); + +var \u0046 = 1; +assert.sameValue(F, 1); + +var \u0047 = 1; +assert.sameValue(G, 1); + +var \u0048 = 1; +assert.sameValue(H, 1); + +var \u0049 = 1; +assert.sameValue(I, 1); + +var \u004A = 1; +assert.sameValue(J, 1); + +var \u004B = 1; +assert.sameValue(K, 1); + +var \u004C = 1; +assert.sameValue(L, 1); + +var \u004D = 1; +assert.sameValue(M, 1); + +var \u004E = 1; +assert.sameValue(N, 1); + +var \u004F = 1; +assert.sameValue(O, 1); + +var \u0050 = 1; +assert.sameValue(P, 1); + +var \u0051 = 1; +assert.sameValue(Q, 1); + +var \u0052 = 1; +assert.sameValue(R, 1); + +var \u0053 = 1; +assert.sameValue(S, 1); + +var \u0054 = 1; +assert.sameValue(T, 1); + +var \u0055 = 1; +assert.sameValue(U, 1); + +var \u0056 = 1; +assert.sameValue(V, 1); + +var \u0057 = 1; +assert.sameValue(W, 1); + +var \u0058 = 1; +assert.sameValue(X, 1); + +var \u0059 = 1; +assert.sameValue(Y, 1); + +var \u005A = 1; +assert.sameValue(Z, 1); diff --git a/test/language/identifiers/vals-eng-alpha-upper.js b/test/language/identifiers/vals-eng-alpha-upper.js new file mode 100644 index 0000000000..41ae9013f2 --- /dev/null +++ b/test/language/identifiers/vals-eng-alpha-upper.js @@ -0,0 +1,86 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of ENGLISH ALPHABET +es6id: 11.6 +description: Check ENGLISH CAPITAL ALPHABET +---*/ + +var A = 1; +assert.sameValue(A, 1); + +var B = 1; +assert.sameValue(B, 1); + +var C = 1; +assert.sameValue(C, 1); + +var D = 1; +assert.sameValue(D, 1); + +var E = 1; +assert.sameValue(E, 1); + +var F = 1; +assert.sameValue(F, 1); + +var G = 1; +assert.sameValue(G, 1); + +var H = 1; +assert.sameValue(H, 1); + +var I = 1; +assert.sameValue(I, 1); + +var J = 1; +assert.sameValue(J, 1); + +var K = 1; +assert.sameValue(K, 1); + +var L = 1; +assert.sameValue(L, 1); + +var M = 1; +assert.sameValue(M, 1); + +var N = 1; +assert.sameValue(N, 1); + +var O = 1; +assert.sameValue(O, 1); + +var P = 1; +assert.sameValue(P, 1); + +var Q = 1; +assert.sameValue(Q, 1); + +var R = 1; +assert.sameValue(R, 1); + +var S = 1; +assert.sameValue(S, 1); + +var T = 1; +assert.sameValue(T, 1); + +var U = 1; +assert.sameValue(U, 1); + +var V = 1; +assert.sameValue(V, 1); + +var W = 1; +assert.sameValue(W, 1); + +var X = 1; +assert.sameValue(X, 1); + +var Y = 1; +assert.sameValue(Y, 1); + +var Z = 1; +assert.sameValue(Z, 1); diff --git a/test/language/identifiers/vals-rus-alpha-lower-via-escape-hex.js b/test/language/identifiers/vals-rus-alpha-lower-via-escape-hex.js new file mode 100644 index 0000000000..16b1dfbdb1 --- /dev/null +++ b/test/language/identifiers/vals-rus-alpha-lower-via-escape-hex.js @@ -0,0 +1,107 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es6id: 11.6 +description: Check RUSSIAN SMALL ALPHABET +---*/ + +var \u{430} = 1; +assert.sameValue(а, 1); + +var \u{431} = 1; +assert.sameValue(б, 1); + +var \u{432} = 1; +assert.sameValue(в, 1); + +var \u{433} = 1; +assert.sameValue(г, 1); + +var \u{434} = 1; +assert.sameValue(д, 1); + +var \u{435} = 1; +assert.sameValue(е, 1); + +var \u{436} = 1; +assert.sameValue(ж, 1); + +var \u{437} = 1; +assert.sameValue(з, 1); + +var \u{438} = 1; +assert.sameValue(и, 1); + +var \u{439} = 1; +assert.sameValue(й, 1); + +var \u{43A} = 1; +assert.sameValue(к, 1); + +var \u{43B} = 1; +assert.sameValue(л, 1); + +var \u{43C} = 1; +assert.sameValue(м, 1); + +var \u{43D} = 1; +assert.sameValue(н, 1); + +var \u{43E} = 1; +assert.sameValue(о, 1); + +var \u{43F} = 1; +assert.sameValue(п, 1); + +var \u{440} = 1; +assert.sameValue(р, 1); + +var \u{441} = 1; +assert.sameValue(с, 1); + +var \u{442} = 1; +assert.sameValue(т, 1); + +var \u{443} = 1; +assert.sameValue(у, 1); + +var \u{444} = 1; +assert.sameValue(ф, 1); + +var \u{445} = 1; +assert.sameValue(х, 1); + +var \u{446} = 1; +assert.sameValue(ц, 1); + +var \u{447} = 1; +assert.sameValue(ч, 1); + +var \u{448} = 1; +assert.sameValue(ш, 1); + +var \u{449} = 1; +assert.sameValue(щ, 1); + +var \u{44A} = 1; +assert.sameValue(ъ, 1); + +var \u{44B} = 1; +assert.sameValue(ы, 1); + +var \u{44C} = 1; +assert.sameValue(ь, 1); + +var \u{44D} = 1; +assert.sameValue(э, 1); + +var \u{44E} = 1; +assert.sameValue(ю, 1); + +var \u{44F} = 1; +assert.sameValue(я, 1); + +var \u{451} = 1; +assert.sameValue(ё, 1); diff --git a/test/language/identifiers/vals-rus-alpha-lower-via-escape-hex4.js b/test/language/identifiers/vals-rus-alpha-lower-via-escape-hex4.js new file mode 100644 index 0000000000..b46c1bab14 --- /dev/null +++ b/test/language/identifiers/vals-rus-alpha-lower-via-escape-hex4.js @@ -0,0 +1,107 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es5id: 7.6_A4.2_T2 +description: Check RUSSIAN SMALL ALPHABET +---*/ + +var \u0430 = 1; +assert.sameValue(а, 1); + +var \u0431 = 1; +assert.sameValue(б, 1); + +var \u0432 = 1; +assert.sameValue(в, 1); + +var \u0433 = 1; +assert.sameValue(г, 1); + +var \u0434 = 1; +assert.sameValue(д, 1); + +var \u0435 = 1; +assert.sameValue(е, 1); + +var \u0436 = 1; +assert.sameValue(ж, 1); + +var \u0437 = 1; +assert.sameValue(з, 1); + +var \u0438 = 1; +assert.sameValue(и, 1); + +var \u0439 = 1; +assert.sameValue(й, 1); + +var \u043A = 1; +assert.sameValue(к, 1); + +var \u043B = 1; +assert.sameValue(л, 1); + +var \u043C = 1; +assert.sameValue(м, 1); + +var \u043D = 1; +assert.sameValue(н, 1); + +var \u043E = 1; +assert.sameValue(о, 1); + +var \u043F = 1; +assert.sameValue(п, 1); + +var \u0440 = 1; +assert.sameValue(р, 1); + +var \u0441 = 1; +assert.sameValue(с, 1); + +var \u0442 = 1; +assert.sameValue(т, 1); + +var \u0443 = 1; +assert.sameValue(у, 1); + +var \u0444 = 1; +assert.sameValue(ф, 1); + +var \u0445 = 1; +assert.sameValue(х, 1); + +var \u0446 = 1; +assert.sameValue(ц, 1); + +var \u0447 = 1; +assert.sameValue(ч, 1); + +var \u0448 = 1; +assert.sameValue(ш, 1); + +var \u0449 = 1; +assert.sameValue(щ, 1); + +var \u044A = 1; +assert.sameValue(ъ, 1); + +var \u044B = 1; +assert.sameValue(ы, 1); + +var \u044C = 1; +assert.sameValue(ь, 1); + +var \u044D = 1; +assert.sameValue(э, 1); + +var \u044E = 1; +assert.sameValue(ю, 1); + +var \u044F = 1; +assert.sameValue(я, 1); + +var \u0451 = 1; +assert.sameValue(ё, 1); diff --git a/test/language/identifiers/vals-rus-alpha-lower.js b/test/language/identifiers/vals-rus-alpha-lower.js new file mode 100644 index 0000000000..b190abeff7 --- /dev/null +++ b/test/language/identifiers/vals-rus-alpha-lower.js @@ -0,0 +1,107 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es6id: 11.6 +description: Check RUSSIAN SMALL ALPHABET +---*/ + +var а = 1; +assert.sameValue(а, 1); + +var б = 1; +assert.sameValue(б, 1); + +var в = 1; +assert.sameValue(в, 1); + +var г = 1; +assert.sameValue(г, 1); + +var д = 1; +assert.sameValue(д, 1); + +var е = 1; +assert.sameValue(е, 1); + +var ж = 1; +assert.sameValue(ж, 1); + +var з = 1; +assert.sameValue(з, 1); + +var и = 1; +assert.sameValue(и, 1); + +var й = 1; +assert.sameValue(й, 1); + +var к = 1; +assert.sameValue(к, 1); + +var л = 1; +assert.sameValue(л, 1); + +var м = 1; +assert.sameValue(м, 1); + +var н = 1; +assert.sameValue(н, 1); + +var о = 1; +assert.sameValue(о, 1); + +var п = 1; +assert.sameValue(п, 1); + +var р = 1; +assert.sameValue(р, 1); + +var с = 1; +assert.sameValue(с, 1); + +var т = 1; +assert.sameValue(т, 1); + +var у = 1; +assert.sameValue(у, 1); + +var ф = 1; +assert.sameValue(ф, 1); + +var х = 1; +assert.sameValue(х, 1); + +var ц = 1; +assert.sameValue(ц, 1); + +var ч = 1; +assert.sameValue(ч, 1); + +var ш = 1; +assert.sameValue(ш, 1); + +var щ = 1; +assert.sameValue(щ, 1); + +var ъ = 1; +assert.sameValue(ъ, 1); + +var ы = 1; +assert.sameValue(ы, 1); + +var ь = 1; +assert.sameValue(ь, 1); + +var э = 1; +assert.sameValue(э, 1); + +var ю = 1; +assert.sameValue(ю, 1); + +var я = 1; +assert.sameValue(я, 1); + +var ё = 1; +assert.sameValue(ё, 1); diff --git a/test/language/identifiers/vals-rus-alpha-upper-via-escape-hex.js b/test/language/identifiers/vals-rus-alpha-upper-via-escape-hex.js new file mode 100644 index 0000000000..828334faca --- /dev/null +++ b/test/language/identifiers/vals-rus-alpha-upper-via-escape-hex.js @@ -0,0 +1,107 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es6id: 11.6 +description: Check RUSSIAN CAPITAL ALPHABET +---*/ + +var \u{410} = 1; +assert.sameValue(А, 1); + +var \u{411} = 1; +assert.sameValue(Б, 1); + +var \u{412} = 1; +assert.sameValue(В, 1); + +var \u{413} = 1; +assert.sameValue(Г, 1); + +var \u{414} = 1; +assert.sameValue(Д, 1); + +var \u{415} = 1; +assert.sameValue(Е, 1); + +var \u{416} = 1; +assert.sameValue(Ж, 1); + +var \u{417} = 1; +assert.sameValue(З, 1); + +var \u{418} = 1; +assert.sameValue(И, 1); + +var \u{419} = 1; +assert.sameValue(Й, 1); + +var \u{41A} = 1; +assert.sameValue(К, 1); + +var \u{41B} = 1; +assert.sameValue(Л, 1); + +var \u{41C} = 1; +assert.sameValue(М, 1); + +var \u{41D} = 1; +assert.sameValue(Н, 1); + +var \u{41E} = 1; +assert.sameValue(О, 1); + +var \u{41F} = 1; +assert.sameValue(П, 1); + +var \u{420} = 1; +assert.sameValue(Р, 1); + +var \u{421} = 1; +assert.sameValue(С, 1); + +var \u{422} = 1; +assert.sameValue(Т, 1); + +var \u{423} = 1; +assert.sameValue(У, 1); + +var \u{424} = 1; +assert.sameValue(Ф, 1); + +var \u{425} = 1; +assert.sameValue(Х, 1); + +var \u{426} = 1; +assert.sameValue(Ц, 1); + +var \u{427} = 1; +assert.sameValue(Ч, 1); + +var \u{428} = 1; +assert.sameValue(Ш, 1); + +var \u{429} = 1; +assert.sameValue(Щ, 1); + +var \u{42A} = 1; +assert.sameValue(Ъ, 1); + +var \u{42B} = 1; +assert.sameValue(Ы, 1); + +var \u{42C} = 1; +assert.sameValue(Ь, 1); + +var \u{42D} = 1; +assert.sameValue(Э, 1); + +var \u{42E} = 1; +assert.sameValue(Ю, 1); + +var \u{42F} = 1; +assert.sameValue(Я, 1); + +var \u{401} = 1; +assert.sameValue(Ё, 1); diff --git a/test/language/identifiers/vals-rus-alpha-upper-via-escape-hex4.js b/test/language/identifiers/vals-rus-alpha-upper-via-escape-hex4.js new file mode 100644 index 0000000000..f3e1645fab --- /dev/null +++ b/test/language/identifiers/vals-rus-alpha-upper-via-escape-hex4.js @@ -0,0 +1,107 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es5id: 7.6_A4.2_T1 +description: Check RUSSIAN CAPITAL ALPHABET +---*/ + +var \u0410 = 1; +assert.sameValue(А, 1); + +var \u0411 = 1; +assert.sameValue(Б, 1); + +var \u0412 = 1; +assert.sameValue(В, 1); + +var \u0413 = 1; +assert.sameValue(Г, 1); + +var \u0414 = 1; +assert.sameValue(Д, 1); + +var \u0415 = 1; +assert.sameValue(Е, 1); + +var \u0416 = 1; +assert.sameValue(Ж, 1); + +var \u0417 = 1; +assert.sameValue(З, 1); + +var \u0418 = 1; +assert.sameValue(И, 1); + +var \u0419 = 1; +assert.sameValue(Й, 1); + +var \u041A = 1; +assert.sameValue(К, 1); + +var \u041B = 1; +assert.sameValue(Л, 1); + +var \u041C = 1; +assert.sameValue(М, 1); + +var \u041D = 1; +assert.sameValue(Н, 1); + +var \u041E = 1; +assert.sameValue(О, 1); + +var \u041F = 1; +assert.sameValue(П, 1); + +var \u0420 = 1; +assert.sameValue(Р, 1); + +var \u0421 = 1; +assert.sameValue(С, 1); + +var \u0422 = 1; +assert.sameValue(Т, 1); + +var \u0423 = 1; +assert.sameValue(У, 1); + +var \u0424 = 1; +assert.sameValue(Ф, 1); + +var \u0425 = 1; +assert.sameValue(Х, 1); + +var \u0426 = 1; +assert.sameValue(Ц, 1); + +var \u0427 = 1; +assert.sameValue(Ч, 1); + +var \u0428 = 1; +assert.sameValue(Ш, 1); + +var \u0429 = 1; +assert.sameValue(Щ, 1); + +var \u042A = 1; +assert.sameValue(Ъ, 1); + +var \u042B = 1; +assert.sameValue(Ы, 1); + +var \u042C = 1; +assert.sameValue(Ь, 1); + +var \u042D = 1; +assert.sameValue(Э, 1); + +var \u042E = 1; +assert.sameValue(Ю, 1); + +var \u042F = 1; +assert.sameValue(Я, 1); + +var \u0401 = 1; +assert.sameValue(Ё, 1); diff --git a/test/language/identifiers/vals-rus-alpha-upper.js b/test/language/identifiers/vals-rus-alpha-upper.js new file mode 100644 index 0000000000..0b4e5d102d --- /dev/null +++ b/test/language/identifiers/vals-rus-alpha-upper.js @@ -0,0 +1,107 @@ +// Copyright (C) 2015 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Correct interpretation of RUSSIAN ALPHABET +es6id: 11.6 +description: Check RUSSIAN CAPITAL ALPHABET +---*/ + +var А = 1; +assert.sameValue(А, 1); + +var Б = 1; +assert.sameValue(Б, 1); + +var В = 1; +assert.sameValue(В, 1); + +var Г = 1; +assert.sameValue(Г, 1); + +var Д = 1; +assert.sameValue(Д, 1); + +var Е = 1; +assert.sameValue(Е, 1); + +var Ж = 1; +assert.sameValue(Ж, 1); + +var З = 1; +assert.sameValue(З, 1); + +var И = 1; +assert.sameValue(И, 1); + +var Й = 1; +assert.sameValue(Й, 1); + +var К = 1; +assert.sameValue(К, 1); + +var Л = 1; +assert.sameValue(Л, 1); + +var М = 1; +assert.sameValue(М, 1); + +var Н = 1; +assert.sameValue(Н, 1); + +var О = 1; +assert.sameValue(О, 1); + +var П = 1; +assert.sameValue(П, 1); + +var Р = 1; +assert.sameValue(Р, 1); + +var С = 1; +assert.sameValue(С, 1); + +var Т = 1; +assert.sameValue(Т, 1); + +var У = 1; +assert.sameValue(У, 1); + +var Ф = 1; +assert.sameValue(Ф, 1); + +var Х = 1; +assert.sameValue(Х, 1); + +var Ц = 1; +assert.sameValue(Ц, 1); + +var Ч = 1; +assert.sameValue(Ч, 1); + +var Ш = 1; +assert.sameValue(Ш, 1); + +var Щ = 1; +assert.sameValue(Щ, 1); + +var Ъ = 1; +assert.sameValue(Ъ, 1); + +var Ы = 1; +assert.sameValue(Ы, 1); + +var Ь = 1; +assert.sameValue(Ь, 1); + +var Э = 1; +assert.sameValue(Э, 1); + +var Ю = 1; +assert.sameValue(Ю, 1); + +var Я = 1; +assert.sameValue(Я, 1); + +var Ё = 1; +assert.sameValue(Ё, 1); diff --git a/test/language/identifiers/yield-as-label-in-sloppy.js b/test/language/statements/labeled/value-yield-non-strict.js similarity index 100% rename from test/language/identifiers/yield-as-label-in-sloppy.js rename to test/language/statements/labeled/value-yield-non-strict.js diff --git a/test/language/identifiers/yield-as-label-in-strict.js b/test/language/statements/labeled/value-yield-strict.js similarity index 100% rename from test/language/identifiers/yield-as-label-in-strict.js rename to test/language/statements/labeled/value-yield-strict.js