65 Commits

Author SHA1 Message Date
Leo Balter
ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Alexey Shvayka
74e0cae407 Add Date.prototype.toJSON coverage (#2190) 2019-06-12 14:59:54 -04:00
Richard Gibson
d62318319f Add tests for string representations of Date objects with negative years (#2114)
* Add tests for string representations of Date objects with negative years

Ref https://github.com/tc39/ecma262/issues/1035
Ref https://github.com/tc39/ecma262/issues/1407
2019-04-02 14:02:35 -04:00
Rick Waldron
f1e362d558 Fix typos; generate tests (#1907) 2018-10-26 17:11:05 -04:00
Andrew Paprocki
cab89848ad Date.parse: Test maximum time value range per spec. 2018-03-22 15:42:56 +00:00
Andrew Paprocki
9db5005ac3 Date.parse: Add 0 (UTC epoch) test per spec. 2018-03-22 15:42:55 +00:00
Rick Waldron
b59d956b3c built-ins/Date/*: make all indentation consistent (depth & character) (#1422) 2018-02-15 16:40:26 -05:00
André Bargull
f95b56ab28 Revert "js-beautify: make all indentation consistent (depth & character) (#1409)" (#1412)
This reverts commit a01de4a722d088055a7d84d8c691ddd7109edb34.
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
Viktor
f9d8b29ae4 A fix for the copyright 2018-01-25 13:59:50 -05:00
Rick Waldron
cc94370eb9 Frontmatter nits 2018-01-17 12:32:11 -05:00
Viktor
290cef061c Create non-integer-values.js 2018-01-17 12:02:19 -05:00
Rick Waldron
92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Leo Balter
7cbbe51216 Add cross-realm feature 2017-09-22 15:29:10 -04:00
Rick Waldron
33995100cd Remove duplicate frontmatter tags 2017-08-11 11:52:21 -04:00
Sue Lockwood
22dc5f99b2 fix valueof frontmatter under Date 2017-08-02 15:47:16 -04:00
deathbearbrown
b7676e8f5f add esid to Date frontmatter 2017-08-02 15:47:16 -04:00
Daniel Ehrenberg
89be4ebff0 Merge pull request #924 from littledan/date-throw
Test that Date.prototype.toString throws for non-Date receiver
2017-06-29 10:33:17 +02:00
Rick Waldron
86209d8fd9 Make all harness/* file names consistent; update occurrences in test
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:58 -04:00
Rick Waldron
e3fa66550f Merge pull request #930 from littledan/date-tostring-tests
Date toString tests
2017-06-22 16:22:08 -04:00
Daniel Ehrenberg
2f3787936b Fix typo from review 2017-06-15 06:25:17 +02:00
André Bargull
d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
Daniel Ehrenberg
99fa2a6c9e Add tests for the formats of toString functions 2017-03-23 12:19:37 +01:00
Daniel Ehrenberg
bd685e552c Tests for "Invalid Date" in more cases
Following the proposed specification in
https://github.com/tc39/ecma262/pull/848
2017-03-21 18:35:10 +01:00
Daniel Ehrenberg
b3115654c1 Test toString() behavior of invalid Dates 2017-03-21 17:48:57 +01:00
Daniel Ehrenberg
1f065b5b71 Changes to Date test from review 2017-03-21 17:46:59 +01:00
Daniel Ehrenberg
7151f3247e Test that Date.prototype.toString throws for non-Date receiver
Pending discussion of https://github.com/tc39/ecma262/issues/849

Test passes in V8.
2017-03-21 10:51:53 +01:00
Leo Balter
9478a43ea7 Fix Date coercion tests (#906)
Fixes #767
2017-03-20 13:15:06 -04:00
Rick Waldron
fdd2fa9b1c Rename $ => $262. Fixes gh-802 (#823)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-03-01 16:34:15 -05:00
André Bargull
204266794c Fix various test issues (#840)
test/annexB/built-ins/Date/prototype/setYear/time-clip.js
test/built-ins/Date/prototype/setFullYear/new-value-time-clip.js
test/built-ins/Date/prototype/setMonth/new-value-time-clip.js
- Don't try to test time-clip at the end points, because this is near
impossible to get right (needs to consider time zone offset, dst, local
mean time because of Africa/Monrovia, etc.).

test/built-ins/DataView/prototype/setFloat64/detached-buffer-after-toindex-byteoffset.js
test/built-ins/DataView/prototype/setInt16/detached-buffer-after-toindex-byteoffset.js
- Wasn't update to expect RangeError

test/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
- Change ClassDeclaration -> ClassExpression to get completion value

test/built-ins/Function/prototype/toString/AsyncFunction.js
- Add missing \n in expected string
- Also fixed in gh-847

test/built-ins/global/global-object.js
- Add 'var' to make test pass in strict-mode

test/language/block-scope/syntax/redeclaration-in-block/attempt-to-redeclare-function-declaration-with-function-declaration.js
- This is allowed in sloppy mode when Annex B is implemented

test/language/expressions/async-generators/expression-yield-as-statement.js
- Fix calls to then()

test/language/module-code/namespace/internals/own-property-keys-binding-types.js
test/language/module-code/namespace/internals/own-property-keys-sort.js
- Tests weren't updated after removal of @@iterator from module
namespace objects

test/language/module-code/namespace/internals/set-prototype-of-null.js
- Fix syntax error

test/language/statements/async-function/early-errors-no-async-generator.js
- No longer valid now that async iteration proposal is at stage 3
2017-02-07 11:10:56 -05:00
Leo Balter
a8c0939bc3 Merge pull request #766 from juandopazo/date-utc-nan
Add tests for non-optional arguments of Date.UTC()
2017-01-23 18:10:21 -05:00
Rick Waldron
8178b763dc Add Date.UTC(+/-Infinity) single arg test variants to infinity-make-day.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-01-19 12:00:10 -05:00
Rick Waldron
1163e1a6ff Moves Date.UTC() test to no-args.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-01-19 11:58:26 -05:00
Rick Waldron
9a308a967b Adds missing Date.UTC(NaN) variant, per review request.
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-01-19 11:55:54 -05:00
jugglinmike
71e573f7da Add tests for realm interactions (#688)
* Add tests for prototype realm inference

* Add tests for miscellaneous realm concerns

* Add tests for realm of spec-created Errors

In some cases, Error objects produced by the specification are
observable from ECMAScript code. Among these cases, some are further
differentiated in that they occur outside of any built-in function and
may be triggered through syntactic production directly. The current
realm record is commonly interpreted incorrectly under these
circumstances.

Add tests asserting that the expected realm record is used when
constructing such Error objects.

* Add tests for realm use in ArraySpeciesCreate

* Add tests for function realm retrieval

* Add tests for cross-realm behaviors of Symbols

* Add tests for GetValue and PutValue

* Add tests for realm of spec-created Arrays

In some cases, Arrays produced by CreateArrayFromList are observable
from ECMAScript code. Among these cases, two occur outside of any
built-in function and may be triggered through syntactic production
directly. The current realm record is commonly interpreted incorrectly
under these circumstances.

Add tests asserting that the expected realm record is used when
constructing arrays.

* Add test for spec-created object

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for realm of spec-created Errors

* fixup! Add tests for prototype realm inference

* fixup! Add tests for miscellaneous realm concerns
2016-10-24 10:43:17 -07:00
Juan Dopazo
b77714514e Add tests for non-optional arguments of Date.UTC() 2016-09-29 13:59:23 -07:00
Anthony Van de Gejuchte
11d7dcc997 Remove duplicate description keys 2016-08-27 18:55:27 -04:00
Mike Pennisi
acebbcaeb2 Add tests for Date.prototype methods 2016-07-09 13:09:15 -04:00
Mike Pennisi
8918e860cc Add tests for Date.UTC 2016-07-09 12:15:17 -04:00
Mike Pennisi
8791771268 Add test for subclassing Date 2016-07-09 12:15:16 -04:00
Mike Pennisi
7ac2aa06ca Add test for name property of Date constructor 2016-07-09 12:15:16 -04:00
Mike Pennisi
577a9cac9e Add tests for use of ToPrimitive in Date ctor 2016-07-09 12:15:15 -04:00
Leo Balter
e49d2661a8 Improve assertions comparing values to NaN (#690)
The global isNaN is not precise at all, and Number.isNaN is an ES6 feature that makes it preferrable to use assert's sameValue for NaN values, as it handles it internally using the comparison.
2016-07-01 11:22:55 -07:00
jugglinmike
a2b3370b0b Add tests for additional uses of @@toPrimitive (#666) 2016-06-10 15:08:59 -04:00
Gorkem Yakin
a432cde542 Merge pull request #534 from mythrialle/master
Removes special handling for UTC timezone in toISOString/15.9.5.43-0-1…
2016-04-25 10:02:19 -07:00
Mythri
664ec78fcc Moves Date constructor outside of assert, so that it actually tests toISOString 2016-04-25 16:45:03 +01:00
Mythri
679d02a6ed Fixed comments 2016-04-25 15:43:55 +01:00
jugglinmike
cf68c3be91 Correct invalid tests for the Date constructor
The millisecond representation of a given Date instance is dependent on
the local system's time zone settings. In order to pass consistently
across contexts, tests for this value must take the system configuration
into account.

Introduce a test harness utility function to encapsulate these concerns.
Re-use this function across all test files that assert the exact
millisecond representation of Date instances.
2016-04-19 17:00:59 -04:00
Mythri
6376e4d833 Removes special handling for UTC timezon in toISOString/15.9.5.43-0-13.js 2016-03-10 15:38:33 +00: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