Commit Graph

2989 Commits

Author SHA1 Message Date
Snapstromegon 568601ddc8 [tc39/ecma262#1645] Remove double error tests (#2290)
Due to changing idempotenxy for dynamic import on failures these tests are no longer needed.
After tc39/ecma262#1645 idempotency is only required after completing normally.
2019-08-13 12:55:24 -04:00
Benjamin E. Coe 8f3aba3024 test: continuing to flesh out optional chaining tests (#2272) 2019-08-13 00:48:50 -04:00
Caio Lima 51b3953d61 Added cases to cover public static field initializer operations with 'this' biding. (#2283)
* Added cases to cover public static field initializer operations with 'this' biding.

* Added initializer that throws.

* Adding missing ';'

* Fixing broken test static-field-initializer-error.js. 'function' keyword
was missing.
2019-08-13 00:21:27 -04:00
Leo Balter 134652ea3c
Merge pull request #2282 from caiolima/static-fields-usage
Tests to cover simple declaration of static fields.
2019-08-13 00:16:40 -04:00
Caio Lima aced1f265f Tests to cover simple declaration of static fields. 2019-08-12 15:01:17 -03:00
Leo Balter 4d31d84531
Fix typo in file names (#2281)
Ref #2241
2019-08-12 09:44:49 -04:00
Leo Balter 00ef6331a6 More cases 2019-08-05 23:07:53 -04:00
Leo Balter 56a2dba975 First set of tests for Top Level Await 2019-08-05 23:07:53 -04:00
Leo Balter 84cff5090e
Merge pull request #2267 from mkubilayk/static-private-method-inner
Add tests for static private method access inside nested functions
2019-08-05 16:47:44 -04:00
Kubilay Kahveci 9b29709797 Add tests for .toString() of private methods (#2268) 2019-08-05 16:47:19 -04:00
Benjamin E. Coe aae991da8a feat: adding tests for optional chaining proposal (#2212) 2019-08-05 11:10:25 -04:00
Leo Balter c4dd26bcee Generate tests 2019-08-05 10:56:24 -04:00
Leo Balter ca9a3fde50 Generate tests 2019-08-05 10:56:24 -04:00
Leo Balter 8893f7a684 Generate tests 2019-08-05 10:55:32 -04:00
Leo Balter ff9763729d Remove duplicated es[56]id if esid is present 2019-08-05 10:54:37 -04:00
Leo Balter ddfe24afe3 Regenerate tests 2019-08-05 10:54:37 -04:00
Kubilay Kahveci 805e78d239 Generate tests 2019-08-02 11:25:10 +01:00
Caio Lima aeff2b0048 Adding case where PrivateName is used inside computed property. (#2241)
* Adding case where PrivateName is used inside computed property.

* Adding proper description to early errors on usage of undeclared private names inside computed property.
2019-07-30 14:53:56 -04:00
Caio Lima 98d4844997 Fixing private-getter-brand-check-multiple-evaluations-of-class-function-ctor to use private getter. (#2259) 2019-07-30 14:53:12 -04:00
Caio Lima 67ab89a4cb Fixing tests that access PrivateNames from another realm to assert the correct TypeError object, since each function will throw the TypeError from the realm where it was created. (#2258) 2019-07-30 14:43:01 -04:00
André Bargull 99f75984db Fix expected test values (#2261)
These two slipped through the cracks in #2097:

test/intl402/Intl/getCanonicalLocales/non-iana-canon.js
- Variant subtag canonicalisation is currrently not allowed.

test/intl402/Locale/getters.js
- Only the first "loc.caseFirst" test in this file was updated in #2097.
2019-07-30 10:53:44 -04:00
Leo Balter 2ee3864136
Add tests for Numeric Separators and BigInt (#2252) 2019-07-23 02:02:22 -04:00
Leo Balter 1affd0ccd5
Add tests for BigInt disallowed in LegacyOctalLike and NonOctal literals (#2253)
Ref https://github.com/tc39/proposal-bigint/issues/208
2019-07-23 01:41:26 -04:00
Leo Balter 7f1116982d
Merge pull request #2251 from leobalter/numeric-fix
Fix structure for numeric literal tests
2019-07-22 13:56:52 -04:00
Leo Balter 5116847aec Fix wording 2019-07-22 13:55:59 -04:00
Leo Balter c0d1182e18 Fix structure for numeric literal tests 2019-07-22 13:53:28 -04:00
Gus Caplan 2fb39cb4e9 add missing feature (#2250) 2019-07-22 12:46:59 -04:00
Leo Balter 1cb241cf36
Merge pull request #2097 from anba/canonical-jan2019
Fix various test issues (Was: Unicode BCP 47 Locale Identifier changes)
2019-07-22 08:57:24 -04:00
Frank Yung-Fong Tang 76eca53cb8 add fractionalSecondDigits.js for formatRange (#2242) 2019-07-22 08:54:24 -04:00
André Bargull 50331bd641 Correct expected value for Intl.Locale 'caseFirst'
An empty string is expected with the current proposal text.
2019-07-22 02:24:48 -07:00
André Bargull 8b725e3957 Updates test for Intl.NumberFormat Unified API Proposal changes. 2019-07-22 02:12:27 -07:00
André Bargull d8c20b423b Call $DONE function exactly once per test
Also make a note in CONTRIBUTING.md that `$DONE` shouldn't be called multiple times.
2019-07-22 02:12:24 -07:00
André Bargull 64b6b844eb Remove invalid template file
The template file violated the conventions from "src/class-elements/conventions.md".

Specifically there must be a global `C` variable, but default exports don't
create a global variable binding. There is no easy way to refer to the current
module and by that retrieve the default export, therefore the template was
removed.
2019-07-22 02:12:23 -07:00
André Bargull 589ef945fa Sort variants added to grandfathered tag
And add an explanation for a previously removed and now re-added assertion.
2019-07-22 02:12:21 -07:00
André Bargull 7b556c6ff2 Intl.getCanonicalLocales changes for UTS 35
intl402/Intl/getCanonicalLocales/canonicalized-tags.js
- Sign languages are no longer canonicalised.
- Variant subtags are sorted alphabetically.

intl402/Intl/getCanonicalLocales/preferred-grandfathered.js
- Canonical form of "cel-gaulish" is "xtg-x-cel-gaulish".

intl402/Intl/getCanonicalLocales/preferred-variant.js
- Variant subtags are no longer canonicalised.
2019-07-22 02:12:18 -07:00
André Bargull e2ad1357c7 Update Intl.Locale tests for UTS 35
constructor-non-iana-canon.js
- Variant subtag canonicalisation is currently no longer present.

constructor-options-region-valid.js
- Digit region codes are now canonicalised.

constructor-tag.js
- Variant subtags are now sorted alphabetically.

likely-subtags-grandfathered.js
- "cmn" is now canonicalised to "zh".
2019-07-22 02:12:17 -07:00
André Bargull 1edeb484b8 Include locales supported through fallback when testing fallbacks
This test started failing when updating to ICU 64, because ICU supports "zh"
and "zh-Hans-CN", but not explicitly also "zh-Hans", which is required for this
test to pass. The same kind of error is reproducible with ICU <64 when "Guru"
is added to the list of script codes in 'testIntl.js', because ICU supports
"pa-Guru-IN", but "pa-IN" isn't explicitly supported, too.

So, change this test to also check 'byFallback' to see if a locale is supported.

Drive-by change:
- Modernise the test to make it more readable how subtags are combined.
- Also add "419" to the list of region codes to cover the digit region syntax.
2019-07-22 02:12:05 -07:00
André Bargull f7e8dba39b Update tests to parse language tags as Unicode BCP 47 Locale Identifiers
harness/testIntl.js
- Add now invalid tags to getInvalidLanguageTags, these tags were previously used in test files changed in this commit.
- Update isCanonicalizedStructurallyValidLanguageTag regular expressions.

test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js
- Moved five now invalid tags to getInvalidLanguageTags function in testIntl.js

test/intl402/Intl/getCanonicalLocales/preferred-grandfathered.js
- All irregular grandfathered tags are invalid now
- Regular grandfathered with extlang subtags are now also invalid
- Regular grandfathered with variant-like subtags are still valid

test/intl402/Intl/getCanonicalLocales/weird-cases.js
- Revert changes from last commit
- "x-u-foo" is now invalid and was moved to getInvalidLanguageTags function

test/intl402/ListFormat/constructor/constructor/locales-valid.js
test/intl402/RelativeTimeFormat/constructor/constructor/locales-valid.js
test/intl402/Segmenter/constructor/constructor/locales-valid.js
- Irregular grandfathered and privateuse only are no longer valid language tags

test/intl402/language-tags-canonicalized.js
- Same changes as in test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js

test/intl402/language-tags-invalid.js
- Invalid tags list in this file was a subset of getInvalidLanguageTags, so replaced with getInvalidLanguageTags to get more coverage

test/intl402/language-tags-valid.js
- Same changes as in test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js
2019-07-21 05:44:21 -07:00
André Bargull 94053978bc Update language tag canonicalisation per UTS35
Main changes:
- "cmn" is now canonicalised to "zh"
- "und-x-" is prepended before grandfathered tags without modern replacements
- "und-" is prepended before privateuse-only language tags
2019-07-21 05:44:21 -07:00
Leo Balter 51d1abadce
Fix typo (#2246) 2019-07-19 16:01:10 -04:00
Leo Balter b3b0e8e190
Merge pull request #2235 from mkubilayk/static-subclass-receiver
Check static private methods on super class are called with correct receiver
2019-07-19 14:01:51 -04:00
Leo Balter b6760c3cc0 Add tests for Numeric Separators not allowed in legacy octal and non octal literals 2019-07-19 13:59:00 -04:00
Leo Balter edeada5376 Add cases for division after a Block
Plus some line terminator checks
2019-07-19 13:57:16 -04:00
Leo Balter a1f7142b89 Generate tests 2019-07-19 13:55:44 -04:00
Caio Lima 1dc78879d4 Add edge tests to verify BigInt to Number conversion when BigInt can't directly be represented by a Number. 2019-07-19 13:53:01 -04:00
Leo Balter 5549fd0022
Merge pull request #2197 from jbhoosreddy/class-decl-module
Add more class declaration formations
2019-07-16 19:30:17 -04:00
Leo Balter 7c1775ae24
Merge pull request #2223 from gibson042/2019-07-rest-param-strict-body
Add tests for rest parameter with "use strict" (expecting syntax error)
2019-07-16 19:23:51 -04:00
Caio Lima b3aea7e831 Adding tests to verify cases on PrivateFieldSet and PrivateFieldGet where we should throw TypeError (#2229) 2019-07-16 19:22:02 -04:00
Frank Yung-Fong Tang dce0910981 change to camelCase to sync with #54 (#2240)
to sync with https://github.com/tc39/proposal-unified-intl-numberformat/pull/54
@sffc @leobalter
2019-07-16 19:00:29 -04:00
Leo Balter d02fe7db38
Add coverage for non object values of the Properties arg of Object.create (#2238)
Fixes #2237
2019-07-15 16:17:03 -04:00
Leo Balter cd79eada15 Update test files to follow lint rule 2019-07-15 14:03:25 -04:00
Frank Yung-Fong Tang f7e6656c13 Remove tests for "quarter" option of Intl.DateTimeFormat (#2232) 2019-07-15 13:51:22 -04:00
Frank Yung-Fong Tang 53d14f56bb Add tests for format/formatToParts of fractionalSecondDigits option (#2234)
* Add more tests for fractionalSecondDigits

* + test of fractionalSecondDigits formatToParts
2019-07-15 13:50:25 -04:00
Kubilay Kahveci 90d59c52f8 Generate tests 2019-07-12 13:33:18 +01:00
Leo Balter 6cb0a531af Fix typos 2019-07-11 11:17:30 -04:00
Leo Balter b45bf4b6fa fixup! Some edgy cases for weakrefs/finalizationgroups 2019-07-11 11:17:30 -04:00
Leo Balter 3c293f0e6c Some edgy cases for weakrefs/finalizationgroups 2019-07-11 11:17:30 -04:00
jbhoosreddy ff05d31b6b generated tests 2019-07-10 20:38:33 -04:00
Richard Gibson c59db6e8bd Generate tests
SRC_DIR=src/function-forms ./make.py
2019-07-10 20:20:16 -04:00
Caio Lima ea359a1d81 Added tests to cover access of private members on inner regular functions and arrow functions. (#2228) 2019-07-10 16:58:19 -04:00
Alexey Shvayka 19b5a5a635 Improve Object#toString coverage (#2202)
* Move proxies with non-string toStringTag to separate file

* Add coverage for async proxy functions

* Add coverage for built-ins with non-string toStringTag

* Move async proxy function tests to new file
2019-07-10 14:00:04 -04:00
Frank Yung-Fong Tang 281c7ff5d0 Correct features to Intl.DateTimeFormat-dayPeriod (#2222) 2019-07-03 18:09:45 -04:00
Nicolò Ribaudo 77f6cfb2aa Add missing features to class fields tests (#2220) 2019-07-03 17:22:14 -04:00
Leo Balter b41b0577a0 Add tests for DateTimeFormat using dayPeriod 2019-07-02 10:04:43 -04:00
Leo Balter 1ef21eb50b fixup! Cleanup some tests for FinalizationGroup 2019-07-02 10:04:04 -04:00
Leo Balter 6242304cd0 Cleanup some tests for FinalizationGroup 2019-07-02 10:04:04 -04:00
Timothy Gu 9dfb9e14e0 Fix WeakMap/WeakSet typo
The test tries to test against WeakSet, but used WeakMap instead.
2019-07-02 09:37:46 -04:00
Caio Lima b1b4177796 Adding cases where private names are used on direct eval calls (#2213)
* Adding cases where private names are used on direct eval calls

* Removing return statement from setter case
2019-06-26 15:08:44 -04:00
Leo Balter 1fb2b78a8d
Merge pull request #2188 from caiolima/private-methods-own-property
Verify that private methods and accessors aren't visible to [[GetOwnProperty]] and [[HasProperty]].
2019-06-26 15:07:47 -04:00
Jaideep Bhoosreddy 51fc533565 Add test for multiple evaluations of classes with private (#2176) 2019-06-26 15:05:10 -04:00
Alexey Shvayka d7c95efe66 Improve "name" tests of Promise built-in functions (#2179) 2019-06-26 15:03:14 -04:00
Leo Balter 7c7d3f756c Fix tests for FinalizationGroup 2019-06-26 13:49:08 -04:00
Caio Lima 166d5ac589 Adding tests to validate HomeObject setup on private methods and accessors (#2214) 2019-06-26 12:03:36 -04:00
Alexey Shvayka 14b6bec36d Add unary operators with NewTarget test (#2199) 2019-06-24 16:45:13 -04:00
Leo Balter f7f07a9010 Add a test for FinalizationGroupCleanupIteratorPrototype 2019-06-21 20:00:35 -04:00
Gus Caplan 61ccff550e Fix invoke-resolve-get-error-close tests (#2210) 2019-06-21 14:26:57 -04:00
Frank Yung-Fong Tang 9d0072df3d Fixes {format,formatToParts}/en-us-numeric-auto.js (#2207)
The following lines expect each unit has property "-1" and "1" 
```
  const expected = unit in exceptions
    ? [exceptions[unit]["1"], exceptions[unit]["0"], exceptions[unit]["0"], exceptions[unit]["-1"]]
    : [`in 1 ${unit}`, `in 0 ${unit}s`, `0 ${unit}s ago`, `1 ${unit} ago`];
```
2019-06-21 13:44:42 -04:00
Gus Caplan 7a1da555a5 add WeakRef feature to WeakRef/constructor test. (#2209) 2019-06-21 13:41:28 -04:00
Leo Balter f7591eb01b fixup 2019-06-21 11:50:22 -04:00
Leo Balter 73f80aea4d Apply review feedback 2019-06-21 11:50:22 -04:00
Leo Balter ca11ac4a43 Add tests for cleanupSome 2019-06-21 11:50:22 -04:00
Leo Balter dcac20d8ed Add tests for FG register/unregister 2019-06-21 11:50:22 -04:00
Leo Balter ab38ce4e84 Add more tests, include deref 2019-06-21 11:50:22 -04:00
Leo Balter c2c81409b2 fixup! Normative optional WeakRef#constructor 2019-06-21 11:50:22 -04:00
Leo Balter 5fabef83dc Normative optional WeakRef#constructor 2019-06-21 11:50:22 -04:00
Leo Balter 16e9389b01 fix typo 2019-06-21 11:50:22 -04:00
Leo Balter 62477ea0c9 More tests 2019-06-21 11:50:22 -04:00
Leo Balter e3d87d6690 No ctor for WeakRef.prototype 2019-06-21 11:50:22 -04:00
Leo Balter 969d4e68b4 Basic tests for weakref and finalizationgroup 2019-06-21 11:50:22 -04:00
Caio Lima bf859771f0 Adding case with computed property and simplifying 'own-property.case' 2019-06-21 12:29:54 -03:00
Caio Lima f1ac274f9d Adding test cases to verify that private methods and accessors are not visible to [[GetOwnProperty]] and [[HasProperty]]. 2019-06-21 09:50:12 -03:00
Alexey Shvayka df1a1c75b7 Remove trailing spaces from YAML blocks (#2201) 2019-06-19 16:39:21 -04:00
Alexey Shvayka 084e45966f Add poisoned __proto__ tests (#2203)
* Add SuperProperty test

* Add SuperCall test

* Add ClassDeclaration test

* Add ClassExpression test
2019-06-19 16:38:30 -04:00
Gus Caplan ceaebf7058 fix built-ins/Object/subclass-object-arg (#2200) 2019-06-19 15:48:53 -04:00
Student Main aa04a11698 Add test case for CJK Unified Ideograph range. (#2193) 2019-06-19 15:34:52 -04:00
Long Ho 6fd738d396 add exceptions for hour & minute in Intl.RelativeTimeFormat numeric auto (#2191) 2019-06-19 15:34:24 -04:00
Alexey Shvayka 395401cba0 Slightly improve JSON.parse coverage (#2196) 2019-06-12 15:29:04 -04:00
Alexey Shvayka 8984ea8080 Add "proxy-missing-checks" feature tag (#2195) 2019-06-12 15:00:18 -04:00
Alexey Shvayka 74e0cae407 Add Date.prototype.toJSON coverage (#2190) 2019-06-12 14:59:54 -04:00
Alexey Shvayka 57f0884396 Use SameValue in verifyProperty helper (#2185) 2019-06-12 14:14:14 -04:00