Commit Graph

64 Commits

Author SHA1 Message Date
Ioanna M Dimitriou H 437f9a7631
Migrate staging tests for JSON-parse-with-source (#4265)
Co-authored-by: Philip Chimento <pchimento@igalia.com>
Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2024-11-06 16:59:30 +01:00
Ioanna M. Dimitriou H 3cacf7d85e Fix CI linting errors 2024-10-15 10:32:14 -07:00
Ioanna M. Dimitriou H 51d86807fe Address review comments 2024-10-15 10:32:14 -07:00
Ioanna M. Dimitriou H 3f8d416bf5 same for isRawJSON's property descriptor test file 2024-10-15 10:32:14 -07:00
Ioanna M. Dimitriou H d103a39e52 Updated placement of tests in rawJSON test files, previous older version was added accidentally. 2024-10-15 10:32:14 -07:00
Ioanna M. Dimitriou H 954d1809f8 Boilerplate tests for rawJSON and isRawJSON
from the proposal json-parse-with-source
2024-10-15 10:32:14 -07:00
Meghan Denny 60963bf468
chore: convert many tests to use verifyProperty (#4263)
Co-authored-by: André Bargull <andre.bargull@gmail.com>
2024-10-14 11:25:05 +02:00
Kevin Gibbons 961480ac61 remove some auto-generated error messages in "assert.throws" tests 2024-03-25 12:09:10 +01:00
rwaldron 2944eb2eca Transform legacy format to harness assertions: test/built-ins/J*/**/*.js 2021-09-02 11:21:59 -07:00
Rick Waldron 0fce065601
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/JSON (#3087) 2021-07-21 11:57:35 -07:00
Gus Caplan ef1ad4c041 add dup __proto__ in json test 2020-10-08 18:05:00 -04:00
Gus Caplan 881c9e3ba5 move __proto__ tests 2020-10-08 18:05:00 -04:00
Rick Waldron d576baf73f Info: adds "sec-evaluatenew" step to info for all "not-a-constructor.js" tests. 2020-10-06 12:01:34 -04:00
Rick Waldron 12ed905003 Clean up some existing constructor checks; eliminate duplicate checks 2020-10-06 12:01:34 -04:00
Rick Waldron c644ede430 Built-in function objects that are not identified as constructors must throw a TypeError exception when new'ed. Fixes gh-1739 2020-10-06 12:01:34 -04:00
Leo Balter b9e4010b20
Fix language in test file (#2700) 2020-07-13 15:01:38 -07:00
Gus Caplan a799a4ac23 Sort out __proto__ occurances outside of annexB 2020-04-18 17:04:51 -04:00
Alexey Shvayka 8fe71e1f56 Drop JSON.stringify stack overflow tests 2020-03-25 11:59:43 -04:00
Alexey Shvayka 1eff480aca Add toJSON stack overflow test 2020-03-23 14:47:16 -04:00
Alexey Shvayka 2255a0ff11 Add replacer stack overflow test 2020-03-23 14:47:16 -04:00
Alexey Shvayka d2b5f63a15 Improve "info" meta of replacer with deleted property test 2020-03-23 14:47:16 -04:00
Alexey Shvayka 963917618f Test that JSON.stringify calls replacer on deleted properties 2020-02-05 14:25:04 -05:00
Kevin Gibbons cadd47aa5f Add test for for-in order (#2432)
* Add EnumerateObjectProperties tests for builtins which use it

* Add tests for EnumerateObjectProperties for for-in

* Add feature flag for for-in-order
2019-12-18 11:25:20 -05:00
Alexey Shvayka 5728e1b6c9 Add reviver prototype chain lookup tests 2019-11-12 02:14:05 +02:00
Alexey Shvayka 80a99f703b Add reviver object with non-configurable property tests 2019-11-12 02:14:05 +02:00
Alexey Shvayka 027cc0c0ca Add reviver array with non-configurable property tests 2019-11-12 02:14:05 +02:00
Alexey Shvayka 64ce046229 Add reviver wrapper test 2019-11-11 23:58:07 +02:00
Leo Balter 71e40aad50
Fix circular tests for JSON.stringify (#2315)
Ref #2168
2019-08-28 17:37:19 -03:00
Alexey Shvayka d0b5137c15 Improve JSON.stringify coverage (#2168)
* Rename & improve "length" test

* Use verifyProperty in "name" test

* Rename & improve property descriptor test

* Remove duplicated test

https://github.com/tc39/test262/blob/master/test/built-ins/Object/prototype/toString/proxy-array.js

* Rename proxy value test

* Rename & improve String object unwrapping test

* Rename & improve Number object unwrapping test

* Rename & improve Boolean object unwrapping test

* Rename & merge replacer returns undefined tests

* Rename & merge replacer function tests

* Rename replacer array revoked proxy test

* Add cross-realm replacer array revoked proxy test

* Add array proxy replacer test

* Add replacer array keys order test

* Add empty replacer array test

* Add non-finite numbers serialization test

* Add replacer array abrupt completion test

* Add replacer array with duplicates test

* Add replacer array ignores undefined test

* Add replacer array unwraps strings test

* Add replacer array unwraps numbers test

* Rename & merge circular object tests

* Add circular array test

* Rename & merge top-level primitives tests

* Rename string escape tests

* Rename BigInt tests

* Rename & improve function value test

* Add replacer function abrupt test

* Rename & merge wrong space type tests

* Rename float number space test

* Rename & improve Number object space test

* Rename & improve String object space test

* Rename basic numeric space test

* Rename string space slice test

* Add replacer array numbers test

* Add toJSON abrupt completions test

* Add not callable toJSON test

* Add toJSON call arguments test

* Add replacer array wrong types test

* Rename & improve string space test

* Rename & improve replacer wrong type test

* Add built-in object requirements test

* Add basic toJSON result test

* Add abrupt array value test

* Add abrupt object value test

* Rename & merge space number clamp tests

* Add replacer function wrapper test

* Add symbol value test

* Add negative zero value test

* Add replacer function & toJSON test

* Add circular object from toJSON test

* Add circular array from toJSON test

* Add circular object from replacer test

* Add circular array from replacer test

* Add replacer function arguments test

* Split & improve proxy value test

* Split & improve revoked proxy value test
2019-08-28 17:34:59 -03:00
Leo Balter ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Alexey Shvayka 395401cba0 Slightly improve JSON.parse coverage (#2196) 2019-06-12 15:29:04 -04:00
Andy Wingo 298ad6907b Add new test for receiver of toJSON on bigint values (#2079)
Spec link:

  https://tc39.github.io/proposal-bigint/#sec-serializejsonproperty

Thanks to André Bargull for the test:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1528784
2019-02-19 13:23:41 -05:00
Richard Gibson e064fcd7ce Remove redundant JSON test 2018-10-03 11:06:32 -04:00
Richard Gibson 58e308753c Fix grammar in JSON.stringify tests 2018-10-03 11:06:32 -04:00
Richard Gibson d961fcc905 Add feature for well-formed-stringify tests 2018-10-03 11:06:32 -04:00
Richard Gibson ce967f7a86 Add tests for proposal-well-formed-stringify
* unpaired surrogate escape sequences
2018-10-03 11:06:32 -04:00
Richard Gibson 783fc5d8bb Remove redundant test 2018-10-03 11:06:32 -04:00
Richard Gibson d6e83453b2 Simplify and improve control character escaping tests 2018-10-03 11:06:32 -04:00
Richard Gibson 61fdc701fa Remove duplicate test 2018-10-03 11:06:32 -04:00
Richard Gibson 950d58a7ca Improve test description grammar 2018-10-03 11:06:32 -04:00
Robin Templeton dbf1362cbc Check that JSON.stringify works with BigInt objects from other realms
This is based on André Bargull's test case in
<https://bugzilla.mozilla.org/show_bug.cgi?id=1464757>.
2018-05-28 19:58:02 -04:00
Rick Waldron 9f57733ed9 Test all no-construct no-call objects consistently (#1520)
Related to https://github.com/tc39/ecma262/pull/1177
2018-04-19 11:23:17 -04:00
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
Robin Templeton 184a37f011 additional BigInt JSON tests (#1235)
* additional BigInt JSON tests

* single quotes

* BigInt stringify order of steps
2017-10-03 17:00:31 -04:00
Robin Templeton 37beb36524
add BigInt tests 2017-08-24 15:58:14 -04: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