29 Commits

Author SHA1 Message Date
Mike Pennisi
47ab262658 Throw distinctive errors for different failures
Prior to this patch, two distinct failure cases would produce the same
generic error message. Refactor the test logic to report the specific
condition which trigger failure.
2021-09-02 10:36:00 -04:00
Mickey Rose
603b10dbfa
avoid unnecessary calls to decimalToHexString() (#3170) 2021-09-01 17:26:54 -04:00
jugglinmike
49347e0cf9
Remove unreachable code (#3165)
* Remove unreachable code

* fixup! Remove unreachable code
2021-08-25 16:13:00 -04:00
Rick Waldron
e5fe379157
chore: migrate $ERROR -> throw new Test262Error in test/language/c* (#3097) 2021-07-21 14:02:21 -07:00
Rick Waldron
ab4a019a4d Example output from legacy code transformer 2020-09-17 16:21:53 -04:00
jugglinmike
d5076e3e8e Add tests for termination of "hashbang" comment (#2104) 2019-03-18 21:23:08 -04:00
André Bargull
c822f4c929 Fix existing linting errors, update error phase, and add a new flags linter (#2086) 2019-03-06 12:24:44 -05:00
André Bargull
334e905d2e Add missing license headers in hashbang tests 2019-02-28 06:40:04 -08:00
Leo Balter
6e4b434586 Apply review feedback
- indirect eval
- files renaming
- space after comma
2019-02-14 15:06:08 -05:00
Leo Balter
f13a0c5aaf Tests with the raw flag can't use $DONOTEVALUATE(); 2019-02-14 15:06:08 -05:00
Leo Balter
4ca5a94852 Final lint fix on tests 2019-02-14 15:06:08 -05:00
Leo Balter
353cf531d6 Apply review feedback for hashbang 2019-02-14 15:06:08 -05:00
Bradley Farias
da8ef2e779 Add tests for Hashbang comments 2019-02-14 15:06:08 -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
Mike Pennisi
41110ab0d4 Correct tests for line terminators within comments
Four tests were documented as asserting the interpretation of line
terminators within multi-line comments, but the source code did not
actually demonstrate this condition.

Introduce new tests that demonstrate the intended functionality and
place them in the correct directory.
2018-11-07 10:12:59 -05: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
André Bargull
cbe12a53e1 Remove duplicate esids 2018-01-25 13:59:37 -05:00
Rick Waldron
bbf3301ff4 Fix: es6id -> esid sec-html-like-comments 2018-01-10 16:01:21 -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
Leo Balter
249935bd37 Follow up for tagging tests with U+180E 2017-09-26 14:13:29 -04:00
Leo Balter
60782de95e Tag tests for U+180E and complete coverage for RegExp matching 2017-09-25 15:27:59 -04: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
Mathias Bynens
3a5a09eba2 Ensure U+180E is no longer considered whitespace
Ref. https://hashseed.blogspot.com/2014/08/in-ecma-262-5.html
Ref. https://github.com/tc39/ecma262/pull/300#issuecomment-181376767
Ref. 9b10d2a597

Fix and add @anba’s U+180E tests
2016-07-06 10:11:32 -04:00
jugglinmike
db8ff7cc01 Add tests for Annex B extns to comments (#612) 2016-05-09 18:29:18 -04:00
Brian Terlson
2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00