Commit Graph

16 Commits

Author SHA1 Message Date
Rick Waldron 7c66f39f41 built-ins/JSON/*: make all indentation consistent (depth & character) (#1440) 2018-02-15 15:25:45 -05:00
André Bargull f95b56ab28 Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722.
2018-02-09 12:09:47 -05:00
Rick Waldron a01de4a722 js-beautify: make all indentation consistent (depth & character) (#1409) 2018-02-09 11:35:37 -05:00
Rick Waldron 92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
André Bargull d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
jugglinmike 2c5138a4c7 Add tests for abrupt completions during JSON.parse (#721)
* Add tests for abrupt completions during JSON.parse

Due to the use of the IsArray abstract operation, observing many of the
targeted semantics requires the use of a Proxy exotic object. Mark the
tests that require this unrelated ES2015 feature using a dedicated
"features" flag.
2016-07-19 14:33:27 -07:00
jugglinmike 96c4e7730b Json whitespace (#724)
* Express JSON syntax tests with multiple assertions

When written with a single assertion, this test verifies only that "one
or more" of the Unicode points produces a SyntaxError. Re-factor the
test so that parsing behavior for each code point can be tested in
isolation.

* Re-introduce assertion

ECMAScript edition 2016 relies on the Unicode standard at version 8.0.0.
As part of a larger effort to update Test262 accordingly, the assertion
for the SyntaxError resulting from the use of the Mongolian Vowel
Separator (U+180E) was removed. However, ECMA-401 (The JSON Data
Interchange Format) continues to describe "insignificant whitespace" as
follows:

> Insignificant  whitespace  is  allowed  before  or  after  any  token.
> The  whitespace  characters  are:  character  tabulation  (U+0009),
> line  feed  (U+000A),  carriage  return (U+000D),  and  space
> (U+0020)

And because ECMA262 specifies step 2 of the `JSON.parse` algorithm as
follows:

> 2. Parse JText interpreted as UTF-16 encoded Unicode points (6.1.4) as
>    a JSON text as specified in ECMA-404. Throw a SyntaxError exception
>    if JText is not a valid JSON text as defined in that specification.

...the use of U+180E between JSON tokens should continue to produce a
SyntaxError, regardless of ECMA262's updated Unicode standard.

* fixup! Express JSON syntax tests with multiple assertions
2016-07-06 23:06:58 -07: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 ee7496f713 Add tests for usage of IsArray (#667) 2016-06-10 15:07:40 -04:00
André Bargull ca61d9b876 Add missing tests for "length" and "name" properties of built-in functions
Note: Already uses the updated DataView function lengths from tc39/ecma262#266 (ES2016 Draft 2015-12-20)
2016-01-15 18:12:05 +01:00
André Bargull 4ec97779fd Replace runTestCase with assert helpers, rest [test/built-ins] 2015-08-13 17:57:23 +02:00
André Bargull 1b14708467 Replace runTestCase with assert helpers [test/built-ins] 2015-08-13 17:50:58 +02:00
André Bargull 8ea6a7e374 Replace runTestCase with assert helpers [test/built-ins/JSON] 2015-08-06 18:25:42 +02:00
André Bargull a85f5039e0 Remove links to hg.ecmascript.org 2015-07-17 17:43:09 +02:00
Mike Pennisi 92890e6723 Remove `$FAIL` function
This function is equivalent to `$ERROR` (which is automatically included
in test environments). Remove the harness file that defines the
function, remove references to the file from test `includes` lists, and
update scripts to instead invoke the `$ERROR` function.
2015-06-09 19:44:25 -04:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00