Commit Graph

95 Commits

Author SHA1 Message Date
Ioanna M. Dimitriou H 9e03c403e7 Test parsing error when using unicode escape sequences to express i, m, s
As suggested in https://github.com/tc39/test262/pull/3960#issuecomment-1966827213
2024-03-05 12:56:48 -08:00
Guillaume Emont 229a27bcbc Added new generated tests with uppercase I
Co-Authored-By: Ioanna M. Dimitriou H <idimitriou@igalia.com>
2024-03-05 12:56:48 -08:00
Cam Tenny 49a58a4716 Adds syntax tests for the RegExp modifiers proposal
Based on PR #3807 which had generated these tests from templates,
but was stuck due to issue #3808.

Co-Authored-By: Guillaume Emont <guijemont@igalia.com>
Co-Authored-By: Ioanna M. Dimitriou H <idimitriou@igalia.com>
2024-03-05 12:56:48 -08:00
Michael Dyck 816b6b14d8 Delete trailing space from "info: |" lines 2024-01-08 16:04:41 +01:00
Veera c1281dba45 Test for Unicode Escape in Literals 2023-10-31 16:57:41 -07:00
André Bargull f2275d23f4 Use verifyProperty in language/literals tests 2023-09-13 16:05:40 +02:00
Kevin Gibbons b42d184876 update descriptions for existing duplicate-capture-groups tests 2022-08-09 12:15:49 -07:00
Rick Waldron 323233be54
chore: migrate $ERROR -> throw new Test262Error in test/language/l* (#3104)
Excludes test/language/line-terminators/*
2021-07-28 13:45:44 -07:00
Mike Pennisi d454b8389b Move some AnnexB tests per proposed spec change
Additionally, update test metadata and introduce two new tests to
complete coverage.

Reference: "Normative: Make B.1.{1,2} normative"
https://github.com/tc39/ecma262/pull/1867
2021-05-21 13:06:41 -04:00
Rick Waldron 1c33fdb0ca Test cases for invalid escape sequences preceding "use strict". Fixes gh-2893 2020-11-04 13:46:04 -05:00
Ross Kirsling f24b9004b3 Add tests for \9 in template/strict strings. 2020-08-03 21:33:44 -04:00
Ross Kirsling fb05c9a4df
Add tests for \8 in template/strict strings. (#2654) 2020-07-20 13:25:59 -07:00
Alexey Shvayka 34b2ab340c Use non ID_Continue characters in negative tests 2020-04-23 10:48:16 -04:00
Alexey Shvayka 89bb1b79e8 Remove negative parse tests that are now valid 2020-04-23 10:48:16 -04:00
Alexey Shvayka 4a8e49b3ca
Add test for \0 in Unicode patterns (#2569) 2020-04-10 15:41:59 -07:00
Alexey Shvayka d279980b96 Add single quote string literal test 2020-03-30 19:30:49 -04:00
Alexey Shvayka 4742461e26 Add double quote string literal test 2020-03-30 19:30:49 -04:00
Ross Kirsling fe4e96d8b0 Remove duplicate test regexp/u-dec-esc.js 2020-03-23 14:33:30 -04:00
Alexey Shvayka 7117cddeca Test astral literals within inverted CharacterClass 2020-03-23 14:29:43 -04:00
Tooru Fujisawa e756399793 Add test for NumericLiteralSeparator after decimal point followed by DecimalDigit 2020-02-05 15:06:46 -05:00
Leo Balter 2ee3864136
Add tests for Numeric Separators and BigInt (#2252) 2019-07-23 02:02:22 -04:00
Leo Balter 1affd0ccd5
Add tests for BigInt disallowed in LegacyOctalLike and NonOctal literals (#2253)
Ref https://github.com/tc39/proposal-bigint/issues/208
2019-07-23 01:41:26 -04:00
Leo Balter 5116847aec Fix wording 2019-07-22 13:55:59 -04:00
Leo Balter c0d1182e18 Fix structure for numeric literal tests 2019-07-22 13:53:28 -04:00
Leo Balter 51d1abadce
Fix typo (#2246) 2019-07-19 16:01:10 -04:00
Leo Balter b6760c3cc0 Add tests for Numeric Separators not allowed in legacy octal and non octal literals 2019-07-19 13:59:00 -04:00
Mike Pennisi c9249a8f92 Remove indirect tests
These tests are ostensibly designed to validate parsing of Regular
Expression literals--specifically those which use Unicode escape
sequences to declare flags. However, because the syntax is expressed in
terms of a string literal and then evaluated dynamically, the escape
sequences in use have no bearing on the program code which is ultimately
parsed. These tests therefore do not extend coverage in any meaningful
way and may be removed.
2019-03-31 20:26:12 -04:00
Mike Pennisi e0120fcbd6 Refactor literal tests for parsers
The tests for the parsing of literal values were expressed using eval.
This made the tests more complex than necessary and also prevented the
tests from providing value to ECMAScript parsers.

Remove the use of eval and instead express the expectations with literal
source text. Rename the files to make each test's purpose more clear.
2019-03-31 20:19:49 -04:00
Mike Pennisi 937d0b1df1 Remove redundant test
The production under test is also used in the following file:

test/language/literals/numeric/legacy-octal-integer-strict.js

That test expresses the syntax with literal source text, making it
useful for parsers. Remove this test in favor of the other.
2019-03-31 20:14:09 -04:00
Leo Balter f7f845ce6f Update tests with DONOTEVALUATE 2018-11-14 09:19:15 -05:00
Leo Balter dec4e5df74
Merge pull request #1801 from mathiasbynens/issue-1634
Move `throw "…"` for negative parsing errors to a helper function
2018-11-13 17:23:09 -05:00
Kevin Gibbons 0160cab518 fix missing/duplicate tests 2018-11-07 13:52:44 -08:00
Kevin Gibbons e80d8a184a split unicode-property-names.js 2018-11-05 15:34:03 -08:00
Kevin Gibbons 9bc9116656 split unicode-malformed.js 2018-11-05 15:23:03 -08:00
Kevin Gibbons 296f47a008 split non-unicode-property-names.js 2018-11-05 15:12:23 -08:00
Kevin Gibbons de339e98d6 split non-unicode-malformed.js 2018-11-05 14:58:03 -08:00
Rick Waldron f1e362d558 Fix typos; generate tests (#1907) 2018-10-26 17:11:05 -04:00
Mathias Bynens b9daa57dcb Rename to $DONOTEVALUATE per @leobalter's suggestion 2018-10-23 13:51:17 +02:00
Mathias Bynens e3feffb01e Move `throw "…"` for negative parsing errors to a helper function
Closes #1634.
2018-10-23 13:51:16 +02:00
Mike Pennisi ccaa9571ea Refactor string literal test for parsers
Thsi test for the parsing of string literals was expressed using `eval`.
This made the test more complex than necessary and also prevented the
test from providing value to ECMAScript parsers.

Remove the use of `eval` and instead express the expectation with
literal source text.
2018-07-13 16:17:19 -04:00
Mike Pennisi 4f1e628107 Remove erroneous test
This test is technically valid because it does trigger a SyntaxError in
conforming runtimes. However, it was authored and documented to test
LegacyOctalEscapeSequence, but due to an apparent typo, it actually
demonstrates an unrelated parsing error.

Because 'legacy-octal-escape-sequence-stricts.js' sufficiently tests the
restriction on LegacyOctalEscapeSequence, remove this test rather than
correct it.
2018-07-13 16:17:19 -04:00
Mike Pennisi 4e1a860abd Remove redundant test
This test for string literals asserts the restriction on
LegacyOctalEscapeSequence in strict mode. It is not sufficiently
distinct from the test 'legacy-octal-escape-sequence-stricts.js' to
warrant inclusion in the test suite. Because that test includes much
more thorough documentation, it should be preferred.
2018-07-13 16:17:19 -04:00
Mike Pennisi 2facd45c76 Remove redundant and indirect tests
A number of tests for string literals assert the restriction on
LegacyOctalEscapeSequence in strict mode code and differ only in the
escape sequence under test. Although each is valid, none of the escape
sequences are sufficiently distinct from the test
'legacy-octal-escape-sequence-stricts.js' to warrant their inclusion in
the test suite. Because that test's use of literal code makes it
consumable by parsers and because that test includes much more thorough
documentation, it should be preferred.

Summary of LegacyOctalEscapeSequences under test in the removed files:

    test/language/literals/string/7.8.4-10-s.js: eval('var x = " \\10 ";');
    test/language/literals/string/7.8.4-11-s.js: eval('var x = "\\16";');
    test/language/literals/string/7.8.4-12-s.js: eval('var x = "\\17";');
    test/language/literals/string/7.8.4-13-s.js: eval('var x = "\\30";');
    test/language/literals/string/7.8.4-14-s.js: eval('var x = "\\31";');
    test/language/literals/string/7.8.4-15-s.js: eval('var x = "\\37";');
    test/language/literals/string/7.8.4-16-s.js: eval('var x = "\\400";');
    test/language/literals/string/7.8.4-17-s.js: eval('var x = "\\411";');
    test/language/literals/string/7.8.4-18-s.js: eval('var x = "\\43a";');
    test/language/literals/string/7.8.4-19-s.js: eval('var x = "\\463";');
    test/language/literals/string/7.8.4-2-s.js:  eval('var x = "\\1";');
    test/language/literals/string/7.8.4-20-s.js: eval('var x = "\\474";');
    test/language/literals/string/7.8.4-21-s.js: eval('var x = "\\77";');
    test/language/literals/string/7.8.4-22-s.js: eval('var x = "\\777";');
    test/language/literals/string/7.8.4-23-s.js: eval('var x = "\\000";');
    test/language/literals/string/7.8.4-24-s.js: eval('var x = "\\001";');
    test/language/literals/string/7.8.4-25-s.js: eval('var x = "\\106";');
    test/language/literals/string/7.8.4-26-s.js: eval('var x = "\\207";');
    test/language/literals/string/7.8.4-27-s.js: eval('var x = "\\377";');
    test/language/literals/string/7.8.4-28-s.js: eval('var x = "\\376";');
    test/language/literals/string/7.8.4-29-s.js: eval('var x = "\\3760";');
    test/language/literals/string/7.8.4-3-s.js:  eval('var x = "a\\4";');
    test/language/literals/string/7.8.4-32-s.js: eval('var x = "\\1\\1";');
    test/language/literals/string/7.8.4-33-s.js: eval('var x = "\\1\\2\\7";');
    test/language/literals/string/7.8.4-4-s.js:  eval('var x = "z\\7";');
    test/language/literals/string/7.8.4-5-s.js:  eval('var x = "\\00a";');
    test/language/literals/string/7.8.4-6-s.js:  eval('var x = "\\01z";');
    test/language/literals/string/7.8.4-7-s.js:  eval('var x = "a\\03z";');
    test/language/literals/string/7.8.4-8-s.js:  eval('var x = " \\06";');
2018-07-13 16:17:19 -04:00
Rick Waldron f578b8754f NumericLiteralSeparator: Update "early" => "parse" in negative tests. Fixes gh-1512 2018-06-07 22:44:03 -04:00
Richard Gibson 3758f6a97c Add tests for LineContinuation in StringLiteral 2018-05-21 12:19:48 -04:00
Steve Fink fab08ab7a2 Add test for numeric literal followed by identifier 2018-05-09 15:45:52 -07:00
Richard Gibson dbc0c6b1cc Add json-superset feature 2018-05-08 14:19:44 -04:00
Richard Gibson ba124c31b2 Add tests for non-ASCII LineTerminator characters in string literals 2018-05-07 16:59:55 -04:00
Daniel Ehrenberg 73b8d9c773 Revert "Revert "Additional tests for QuantifiableAssertion" (#1458)" (#1459)
This reverts commit 173e98e00b.
2018-04-09 17:35:13 -04:00
Valerie 1e1d503c1b numeric literal seperators: test change in CodePoint production (#1464) 2018-02-28 13:58:22 -05:00