Commit Graph

4376 Commits

Author SHA1 Message Date
Leo Balter 13016eb89d
Merge pull request #2416 from devsnek/fix-newlines
Add lint check for missing newlines at end of tests and fix tests without the newlines
2019-11-11 14:48:55 -05:00
Leo Balter 206c0cbb55
Merge branch 'master' into fix-newlines 2019-11-11 14:40:28 -05:00
Gus Caplan 9bb90d1a34 Fix failure phase in coalesce tests (#2415) 2019-11-11 14:38:26 -05:00
Leo Balter 02bdf77b19 Add test for AggregateError's toString
Ref tc39/proposal-promise-any#49
2019-11-11 12:19:20 -05:00
Leo Balter 90231ad16f Remote tests for AggregateError.prototype.toString
Ref tc39/proposal-promise-any#49
2019-11-11 11:20:24 -05:00
Gus Caplan a53f43e1ce
add missing newlines in tests 2019-11-10 20:18:56 -08:00
Gus Caplan 833825849d
add lint check for newline at end of file 2019-11-10 20:18:53 -08:00
Leo Balter 1bc193528b
Add tests for AggregateError (#2406)
This covers part of the Promise.any proposal
2019-11-07 11:01:21 -05:00
Ross Kirsling 91861e2330 Remove incorrect optional chaining tests. (#2411) 2019-11-01 14:05:31 -04:00
Caio Lima d89c2cd601 Adding case to test invalid syntax when using PrivateName after '?.' (#2408) 2019-11-01 10:44:07 -04:00
Leo Balter 21195de94c
Inital commit for Intl.DisplayNames tests (#2404) 2019-10-17 10:32:00 -04:00
Ms2ger 4b6efea2c6 Add more tests for DateTimeFormat.hourCycle/hour12. (#2385)
In particular, when using dateStyle/timeStyle.

See also <https://github.com/tc39/proposal-intl-datetime-style/issues/34>.
2019-10-15 12:39:34 -04:00
Frank Yung-Fong Tang 146ef7db57 add features: [Intl.DateTimeFormat-formatRange] (#2403) 2019-10-10 15:27:20 -04:00
Leo Balter 98883a577e
Use canonical format for the description in the metatags (#2401)
Ref #2387
2019-10-10 11:30:26 -04:00
Leo Balter f25ae223b8 Add cases for matching paren covered logical expressions 2019-10-09 21:52:52 -04:00
Leo Balter f0f4cd6138 Improve metadata 2019-10-09 21:52:52 -04:00
Leo Balter c7a158e74b Add feature 2019-10-09 21:52:52 -04:00
Leo Balter ec41c1a417 Add tests for Nullish Coalesce Expression 2019-10-09 21:52:52 -04:00
Leo Balter 6b66b82d88 Cleanup compareArray and deepEqual assertions, remove assert._formatValue
Fixes #2372
2019-10-09 17:57:10 -04:00
Leo Balter 4182972a49
Merge pull request #2396 from leobalter/2381/yaml
Yaml consistency
2019-10-09 13:29:16 -04:00
Jordan Harband 59d1af9d2a [matchAll] pass a global regex (#2399)
- also, expect the right kind of error in `flags-undefined-throws.js`

Fixes #2398
2019-10-09 10:32:39 -04:00
Leo Balter d49777de27 Whitespace cleanups. CRLF => LF 2019-10-08 20:44:09 -04:00
Alexey Shvayka bb6ce7e435 Add test for Proxy "has" trap on prototype (#2382)
* Use allowProxyTraps.js in [[Set]] tests

* Add [[HasProperty]] test
2019-10-08 14:58:27 -04:00
Alexey Shvayka 1aac32e2f8 Improve Proxy/ownKeys invariants coverage (#2384)
* Add non-configurable invariant test

* Add non-extensible invariant test
2019-10-08 14:54:46 -04:00
Frank Yung-Fong Tang 79591ae6c8 Add test for #349 and #351 PR (#2379)
Test DateTimeFormat change pattern based on calendar and output relatedYear and yearName
based on the assumption that "en-u-ca-chinese" will output 'relatedYear' and 'yearName'.
https://github.com/tc39/ecma402/pull/349
https://github.com/tc39/ecma402/pull/351
@rwaldron @leobalter @Ms2ger @littledan
2019-10-08 14:54:02 -04:00
Leo Balter 2b48ec7a00 More yaml and whitespace fixes
Ref #2383
2019-10-08 14:50:57 -04:00
Leo Balter 917e6f7f99 Yaml consistency
Ref #2381
2019-10-08 14:48:59 -04:00
Frank Yung-Fong Tang 79a01f5122 Add tests for 'numberingSystem' and 'calendar' options (#2383)
* Add tests for 'numberingSystem' option

* add constructor-numberingSystem-order.js

* correct esid

* initial actual

* add let

* add constructor-calendar-numberingSystem-order.js
2019-10-08 14:48:46 -04:00
Frank Yung-Fong Tang b073c48b49 Add test to ensure Intl.DateTimeFormat choose pattern by calendar (#2381)
* Add test for different pattern based on calendar

* Add test for formatRangeToParts

* remove  debug print

* fix typo

* fix typo

* address review feedback

* address review feedback

* change the map and use string template

* rewrite maps and use string template
2019-10-08 14:44:41 -04:00
Frank Yung-Fong Tang 8f6369d1c4 Add more tests for ListFormat (#2387)
* add tests for ListFormat

address https://github.com/tc39/test262/issues/2386

* add test for formatToParts(undefined)

* test GetIterator throw error

* test formatToParts while GetIterator throws error

* test formatToParts while step_iterator throw

* test format while iteratorStep throw

* fix object name

* test format while IteratorValue throws

* test formatToParts while iteratorValue throws

* test formatToParts while iteratorClose call return

* check format with iteratorClose calls return
2019-10-08 14:42:42 -04:00
Frank Yung-Fong Tang 2715f312db Add tests for ListFormat StringListFromIterable ( iterable ) (#2380)
* Add tests for StringListFromIterable

* add case throw TypeError

* add test for formatToParts

* add test for formatToParts
2019-10-08 14:42:26 -04:00
Alexey Shvayka 71a70fc117 Use isConstructor in "executor-function-nonconstructor.js" (#2393) 2019-10-08 14:41:29 -04:00
Alexey Shvayka 34cbf0aed2 Add "proto-from-ctor-realm" tests for Intl proposals (#2346)
* Add Intl.Segmenter test

* Add Intl.RelativeTimeFormat test

* Add Intl.Locale test

* Add Intl.ListFormat test
2019-10-08 14:39:52 -04:00
Joyee Cheung 13882715c3 Undefined private name access in computed property keys should throw TypeError (#2390)
Refs: https://github.com/tc39/proposal-class-fields/pull/269
2019-10-08 14:39:15 -04:00
Mathias Bynens a898fe9826 Add missing `regexp-match-indices` feature tags (#2395) 2019-10-08 14:38:39 -04:00
Leo Balter 8688c4ab79
Fix typo: iterator => iterator (#2394)
Fix #2392
2019-10-07 12:43:23 -04:00
Leo Balter 0a22ea3d29
Merge pull request #2388 from nicolo-ribaudo/patch-9
Add missing "flags: [module]" to top level await tests
2019-10-03 14:48:34 -04:00
Jordan Harband f3e950e8ed tests for String.prototype.matchAll changes (#2389)
Per https://github.com/tc39/ecma262/pull/1716
2019-10-03 14:47:00 -04:00
Nicolò Ribaudo 38709d0cca
Generate tests 2019-10-03 11:35:52 +02:00
Nicolò Ribaudo bc406c0cf7
Add missing "flags: [module]" to top level await tests 2019-10-03 11:35:48 +02:00
Leo Balter a1acc23cd8
Merge pull request #2367 from bocoup/unnecessary-includes-lint
lint: add rule to verify use of harness files
2019-09-27 16:47:40 -04:00
Leo Balter e2903e2648
Merge pull request #2366 from bocoup/unnecessary-includes
Remove unnecessary "includes" directives
2019-09-27 16:46:22 -04:00
jugglinmike 87e875f6c9 Correct errors in metadata (#2378)
* Correct typo

* Correct esid
2019-09-27 16:32:52 -04:00
jugglinmike 8953024f1a Remove duplicate tests (#2377)
* Remove duplicate test

The behavior under test is verified by another file in Test262:

test/language/expressions/compound-assignment/S11.13.2_A2.1_T3.3.js

That version is preferable because it does not depend on `eval` and
because it supports both strict and non-strict mode.

* Remove overly-permissive test

By asserting only the presence of an "own" property, this test can be
satisfied from both strict mode code and non-strict mode code.

The following test verifies the presence of the "own" property and the
associated descriptor's values in strict mode:

test/language/arguments-object/10.6-13-c-3-s.js

That subsumes the semantics verified by this test, making it
superfluous. Remove the test.

* Remove overly-permissive test

By asserting only the absence of a syntax error, this test can be
satisfied from both strict mode code and non-strict mode code.

The following test verifies the runtime behavior of accessing the
property in strict mode code:

test/language/arguments-object/10.6-13-c-1-s.js

That subsumes the semantics verified by this test, making it
superfluous. Remove the test.

* Remove duplicate test

The behavior under test is verified by another file in Test262:

test/built-ins/Math/prop-desc.js

That version is preferable because it follows the test suite's
convention for testing property descriptors and because it supports both
strict and non-strict mode.

* Remove duplicate test

The behavior under test is verified by two separate files:

test/language/statements/function/line-terminator-non-strict.js
test/language/statements/function/line-terminator-strict.js

These files differ only in their usage of the `noStrict`/`onlyStrict`
metadata. Because tests are intended to be interpreted in both modes by
default, these can be expressed with a single file that does not limit
the permissible modes.
2019-09-27 16:31:44 -04:00
Leo Balter 83d9f750c9
Merge pull request #2376 from bocoup/ud-coverage
Improve coverage
2019-09-27 16:30:13 -04:00
jugglinmike 479ea0ec0b Avoid false positive (#2375)
Prior to this patch, the modified test would pass if no exception was
produced. Use the `assert.throws` utility function to concisely express
the expectation more completely.
2019-09-27 16:25:07 -04:00
jugglinmike 83483b7310 Consolidate harness tests (#2374) 2019-09-27 16:24:02 -04:00
jugglinmike 5757d60e17 Correct syntax in generated tests (#2373)
Prior to the application of this patch, the modified test template
included an unintentional syntax error. This caused all generated tests
to spuriously satisfy the expectation for an error.

Correct the syntax in the test template and regenerate the tests,
ensuring that when engines report a syntax error, they are demonstrating
the behavior which the tests were designed to verify.
2019-09-27 16:22:56 -04:00
Mike Pennisi d4a91a163b Improve coverage: function declarations
Previously, these tests were limited to strict mode. The syntactic
restriction under test also applied outside of strict mode even when
Annex B is observed, so configure the tests to also run outside of
strict mode.
2019-09-27 15:39:10 -04:00
Mike Pennisi 9cd62ffbd7 Improve coverage: ctor props of the global object
Prior to this commit, the descriptors of the constructor properties of
the global object were verified inconsistently, many independent
assertions occured in the same file, and that file test was poorly
located.

Restructure the relevant tests to improve coverage, follow convention,
and promote discoverability.
2019-09-27 15:39:10 -04:00