Commit Graph

27 Commits

Author SHA1 Message Date
Mathias Bynens 59bad89898
Add Unicode v15.1.0-sensitive `IdentifierPart` tests (#3833)
Ref. https://github.com/tc39/ecma262/issues/3073
2023-09-15 12:27:42 +02:00
Mathias Bynens e79a1935ed
Add tests for Unicode v15 Identifier{Start,Part} (#3662)
Issue: https://github.com/tc39/ecma262/issues/2904
2022-09-21 11:24:26 +02:00
Csaba Osztrogonác 00f682e746 tools: enforce restriction on YAML negative key
The phase field must precede the type field for negative tests
to have a consistent style and be able to parse easier.
Related to the goal of https://github.com/tc39/test262/issues/1997

Added this check to the linting script and updated tests accordingly.
2022-01-10 13:50:38 -05:00
Mathias Bynens f864edbc1c Add identifier tests for private class fields specifically
@bathos discovered that multiple engines implement this incorrectly:
https://twitter.com/bhathos/status/1478370049303928832

With that in mind, it’s probably worth adding some test coverage.
Test generator patch: https://github.com/mathiasbynens/caniunicode/pull/6
2022-01-05 14:24:20 -05:00
Mathias Bynens 5d3eed6433
Add tests for Unicode v14 Identifier{Start,Part} (#3198)
Issue: https://github.com/tc39/ecma262/issues/2514
2021-10-15 20:19:22 -04:00
Rick Waldron f4914e133e
chore: migrate $ERROR -> throw new Test262Error in test/language/i* (#3102) 2021-07-28 13:46:58 -07:00
akluball e73054f75e
Add tests for ZWJ and ZWNJ in identifiers (#2723) 2020-08-05 12:27:34 -07:00
Mathias Bynens b005b63273 Correct descriptions w.r.t. identifier start/part characters
Ref. https://github.com/mathiasbynens/caniunicode/issues/3.
2020-05-06 11:54:16 -04:00
Mathias Bynens b29b1dac05
Add tests for new identifier characters per Unicode version (#2532)
Ref. https://github.com/tc39/ecma262/issues/1897
Ref. https://github.com/tc39/ecma262/issues?q=label%3Aunicode
2020-03-16 12:06:09 -07:00
Student Main aa04a11698 Add test case for CJK Unified Ideograph range. (#2193) 2019-06-19 15:34:52 -04:00
Ross Kirsling d0f57bff72 Ensure test file YAML blocks don't have a trailing space. (#2018) 2019-01-07 11:40:39 -02: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
Valerie 1e1d503c1b numeric literal seperators: test change in CodePoint production (#1464) 2018-02-28 13:58:22 -05:00
André Bargull f3911d7ae4 Update remaining tests to use 'parse' instead of 'early' error phase 2018-01-25 13:59:37 -05:00
Mike Pennisi 136110378b Rename negative test "phase" for parsing
Early errors may result from parsing the source text of a test file, but
they may also result from parsing some other source text as referenced
through the ES2015 module syntax. The latter form of early error is not
necessarily detectable by ECMAScript parsers, however. Because of this,
the label "early" is not sufficiently precise for all Test262 consumers
to correctly interpret all tests.

Update the "phase" name of "early" to "parse" for all those negative
tests that describe errors resulting from parsing of the file's source
text directly. A forthcoming commit will update the remaining tests to
use a "phase" name that is more specific to module resolution.
2018-01-05 15:17:50 -05:00
Rick Waldron 92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Rick Waldron a801bdf786 Fix frontmatter 2017-12-19 15:42:57 -05:00
André Bargull 6b8bd307d2 Test other-id-start/continue and vertical tilde in identifiers 2017-12-19 15:42:56 -05:00
Mike Pennisi 81d00def42 Force "early error" tests to fail if evaluated
This pattern makes expectations more explicit by making test files more
literal.
2017-06-28 11:24:36 -04:00
Mike Pennisi 7d4b1d28ae Re-format tests for SyntaxErrors
Authored via the following command:

   $ find test -type f -print0 | \
       xargs -0 sed \
         -i 's/^\(\s*\)negative:\s*SyntaxError\s*$/\1negative:\n\1  phase: early\n\1  type: SyntaxError/g'
2016-10-19 15:24:21 -04:00
Kevin Gibbons 69969e16b1 Remove extraneous indent in header, for consistency 2015-08-24 15:24:10 -07:00
André Bargull a85f5039e0 Remove links to hg.ecmascript.org 2015-07-17 17:43:09 +02:00
Mike Pennisi e0d59b0ede 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
2015-07-09 18:52:22 -04:00
André Bargull 9a602905d7 Fix strict mode errors in language/{identifiers, line-terminators, white-space}
Make tests strict mode compatible by assigning result value to a separate variable.

Part of issue #35.
2015-05-08 17:33:33 +02:00
Mike Pennisi 93d994df0f Import tests from Google V8 (generator syntax)
These tests are derived from the following files within the Google V8
project:

    test/mjsunit/es6/generators-parsing.js
2015-04-14 16:22:12 -04:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00