Commit Graph

186 Commits

Author SHA1 Message Date
Ms2ger ce8d0520b8 Add some more Locale tests. 2018-05-15 17:27:57 +02:00
Ms2ger 9300187c75 Improve and extend the tests for ApplyOptionsToTag. 2018-05-15 14:37:31 +02:00
Rick Waldron e845e21bf5 Intl.Locale: minor fixups (#1554)
- fix mixed up test & info
- add Symbol feature
- maximize length is 0
- maximize configurability is true
2018-05-11 16:37:52 -03:00
Rick Waldron 83d815328f Intl.Locale: follow up tasks, set 1. Ref gh-1538 (#1540) 2018-05-04 14:49:37 -03:00
Ms2ger eecf4d46ad Submit some Intl.Locale() tests.
Some of these are based on work by André Bargull in
<https://bugzilla.mozilla.org/show_bug.cgi?id=1433303>.
2018-05-03 14:21:10 -04:00
Ms2ger 190cf5c730 Extract list of structurally invalid tags from invalid-tags.js. 2018-05-03 14:20:39 -04:00
André Bargull b552dad5cb Various test cases for cross-browser compliance bugs 2018-05-03 09:27:27 -07:00
André Bargull 40a7bd2401 Add test cases for tc39/ecma402#194 2018-01-25 14:04:44 -05:00
André Bargull 0ec5b02ac6 Add test case for tc39/ecma402#204 2018-01-25 13:59:15 -05:00
Rick Waldron d7b5715e6c Fix: various lint fixes 2018-01-11 10:21:08 -05:00
Rick Waldron 92a2621901 Frontmatter: fixup "info: >" to "info: |" 2018-01-05 12:27:59 -05:00
Rick Waldron 5155397373 Add missing features 2017-12-21 16:46:57 -05:00
André Bargull 91460f90de Update property-descriptor tests to use verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull c9ef958d01 Update currency digits data 2017-12-21 16:46:56 -05:00
André Bargull b6e9f9425f Remove unused includes in Intl test files 2017-12-21 16:46:56 -05:00
André Bargull a380c6b000 Use more descriptive names for Intl test files 2017-12-21 16:46:56 -05:00
André Bargull 60692bb6e0 Move remaining testBuiltInObject callers to use normal assert calls 2017-12-21 16:46:56 -05:00
André Bargull c81370348d No longer use testBuiltInObject for built-in objects 2017-12-21 16:46:56 -05:00
André Bargull ecf814bb4c No longer use testBuiltInObject for built-in constructors 2017-12-21 16:46:56 -05:00
André Bargull 4337b396bd Add separate test files for property attributes of Intl properties 2017-12-21 16:46:56 -05:00
André Bargull 513a3056fb Add separate test files to test the length property of Intl functions 2017-12-21 16:46:56 -05:00
André Bargull c2c274fe8a Update collations and calendar data in test files to CLDR 32 2017-12-21 16:46:56 -05:00
André Bargull f65bd7af7a Require correct hour-cycle setting instead of either h11 or h12 resp. h23 or h24 2017-12-21 16:46:56 -05:00
André Bargull 72db5f1ec1 Replace mustHaveProperty with verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull ce3c3d7dbd Replace mustNotHaveProperty with verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull 20ea611db7 Replace mayHaveProperty with verifyProperty 2017-12-21 16:46:56 -05:00
André Bargull 56323fe2dd Also test Intl.PluralRules if available 2017-12-21 16:46:55 -05:00
André Bargull 48173672f2 Inline testValidDateTimeComponentValue into single test using this function 2017-12-21 16:46:55 -05:00
André Bargull 017fa6d55f Remove caching of getLocaleSupportInfo() return value 2017-12-21 16:46:55 -05:00
André Bargull 123259733b Replace testArraysAreSame with assert.compareArray 2017-12-21 16:46:55 -05:00
André Bargull e65c65c293 Remove unused return value from testWithIntlConstructors 2017-12-21 16:46:55 -05:00
André Bargull 9f39d988e1 Unicode extension subtags correctly detected in Intl.Collator 2017-12-19 15:42:56 -05:00
André Bargull 1abd6c6593 Extend coverage for Intl.getCanonicalLocales 2017-12-19 15:42:56 -05:00
Daniel Ehrenberg 1702336a77 Test change in PluralRules default options semantics (#1350)
The change is done in the following patch, where default options
have a null prototype. This matches what other Intl objects have.
1abe8af440
2017-11-21 14:13:44 -05:00
Valerie R Young d68faa904f regenerate tests 2017-10-17 17:47:52 -04:00
Leo Balter 1afb7c74fd Merge pull request #986 from dilijev/intl-gcl
Add version of intl402/6.2.3.js which tests via Intl.getCanonicalLocales
2017-10-06 12:37:36 -04:00
Zibi Braniecki a042cd68f7 Intl.DateTimeFormat hourCycle tests (#1265) 2017-10-06 12:23:57 -04:00
Valerie R Young 3c94ba0116 Fixup of 'Add version of intl402/6.2.3.js...' 2017-10-05 15:34:56 -04:00
Doug Ilijev 19caba81c4 Add version of intl402/6.2.3.js which tests via Intl.getCanonicalLocales 2017-10-05 15:28:57 -04:00
Zibi Braniecki 2889100f21 Update Intl.NumberFormat.prototype.formatToParts.length to expect 1 (#1249)
As per https://github.com/tc39/ecma402/pull/160 the formatToParts.length is set to 1.
2017-10-02 15:41:27 -04:00
Josh Wolfe 261579694e NumberFormat formatToParts with no arguments 2017-09-19 11:52:36 -04:00
Daniel Ehrenberg 765f273ac4 intl: Tests for default options tweak proposal (#1220)
Tests for ECMA 402 PR https://github.com/tc39/ecma402/pull/170
The tests on Date/DateTimeFormat are valid without the PR.
2017-09-12 12:12:55 -04:00
Daniel Ehrenberg 8e5ffb66bf Add tests for proposal to make Intl prototypes not instances (#1079)
This proposal was started in https://github.com/tc39/ecma402/issues/122,
and specified in https://github.com/tc39/ecma402/pull/148
2017-09-06 13:58:03 -04:00
André Bargull 0271179c4a Use assert-lib: intl402/PluralRules 2017-05-04 21:25:02 +02:00
André Bargull bfac377fca Use assert-lib: intl402 2017-05-04 21:16:14 +02:00
André Bargull 3841b0a09e Use assert-lib: intl402/String 2017-05-04 21:15:31 +02:00
André Bargull 8bed4d442d Use assert-lib: intl402/NumberFormat 2017-05-04 21:14:46 +02:00
André Bargull 315031c07d Use assert-lib: intl402/Number 2017-05-04 21:14:05 +02:00
André Bargull c63cb39cbb Use assert-lib: intl402/Intl 2017-05-04 21:13:23 +02:00
André Bargull 1579764e37 Use assert-lib: intl402/DateTimeFormat 2017-05-04 21:12:42 +02:00
André Bargull 94e9ad831e Use assert-lib: intl402/Date 2017-05-04 21:12:00 +02:00
André Bargull 3aa427257b Use assert-lib: intl402/Collator 2017-05-04 21:10:58 +02:00
André Bargull d59e30c95e Remove execute bit from files (#976) 2017-04-13 16:24:07 -04:00
André Bargull 3291704eb2
Fix multiple test errors
Tests doesn't use async functionality and don't call $DONE, so remove
"async" flag:
- src/params/error/async-gen-named-func-expr.template
- test/language/expressions/async-generator/params-named-dflt-abrupt.js
- test/language/expressions/async-generator/params-named-dflt-ref-later.js
- test/language/expressions/async-generator/params-named-dflt-ref-self.js

Intl.PluralRules.prototype is no longer a Intl.Prototype instance:
- test/intl402/PluralRules/prototype/prototype.js

Intl.PluralRules throws an error when called as a function:
- test/intl402/PluralRules/undefined-newtarget-throws.js

Module namespace objects call OrdinaryDelete for symbol properties:
- test/language/module-code/namespace/internals/delete-non-exported.js

Async generators no longer retrieves "done" property twice:
- src/async-generators/yield-star-async-next.case
- src/async-generators/yield-star-async-return.case
- src/async-generators/yield-star-async-throw.case

Minor units of CLF is 4, so we need to test with maximumFractionDigits=3
to get an error:
- test/intl402/NumberFormat/dft-currency-mnfd-range-check-mxfd.js

DateTimeFormat.prototype.formatToParts length property was changed from
0 to 1:
- test/intl402/DateTimeFormat/prototype/formatToParts/length.js

minimumSignificantDigits and maximumSignificantDigits properties are
only retrieved once:
- test/intl402/NumberFormat/11.1.1_32.js
2017-04-06 15:30:13 -04:00
Daniel Ehrenberg a9d9ab1a51
Add tests for some NumberFormat options edge cases
Closes #888

These tests are regression tests for V8 failures at top of tree,
https://bugs.chromium.org/p/v8/issues/detail?id=6015
https://bugs.chromium.org/p/v8/issues/detail?id=6016

Neither issue is present in JSC or SpiderMonkey. They are fixed
by the V8 patch
https://codereview.chromium.org/2717613005
2017-03-23 11:50:33 -07:00
Leo Balter 6c20a250f2 Add references to fixed tests for NumberFormat operations (#874)
Ref #856
Ref #857
Ref tc39/ecma402#128
2017-03-13 10:47:30 -07:00
vabr-g 42ebb3a9ab Add test for NumberFormat default minimumSignificantDigits (#864) 2017-03-01 16:39:57 -05:00
André Bargull 6b09ad0459 Update YAML frontmatter of some tests to be compatible with monkeyYaml (#862) 2017-03-01 16:35:37 -05:00
Viktor 58b326f0c4 fix for the wrong test of Intl.NumberFormat (ToRawPrecision) (#857)
1) (123.44500) == 123.444999999999993179
2) (123.44500).toPrecision(5) === "123.44" gives correct value in Chrome and Firefox;

Ref https://github.com/tc39/ecma402/issues/128
2017-03-01 16:14:33 -05:00
Viktor 9fd3b582c7 fix for the wrong test of Intl.NumberFormat (ToRawFixed) (#856)
Note:
12344501000000000487815444678311936 === 12344501000000000000000000000000000 for binary64 floating points;

Ref https://github.com/tc39/ecma402/issues/128
2017-03-01 16:14:00 -05:00
André Bargull 76320ad18d Update tests when Intl constructor is called as a function
https://github.com/tc39/ecma402/issues/57
https://github.com/tc39/ecma402/pull/84
2017-02-22 18:05:34 +01:00
André Bargull fdccf26317 Update length property test for Intl.DateTimeFormat.prototype.format
Per https://github.com/tc39/ecma402/issues/76
2017-02-22 18:05:16 +01:00
littledan e31b7c43b0 Test for case-insensitivity in invalid BCP 47 usage (#836)
This patch adds a regression test for a previous V8 bug reported originally at
https://bugs.chromium.org/p/v8/issues/detail?id=4215
2017-01-20 11:56:46 -08:00
Zibi Braniecki 82c2ca0709 Add Intl.PluralRules tests (#782)
* Add Intl.PluralRules tests

* document the tests
2017-01-18 15:56:44 -08:00
Zibi Braniecki 28fc809f3e Remove BYR currency code which has been removed from ISO 4217 (#818) 2017-01-09 14:27:23 -08:00
jungshik 6a0f1189eb Drop 3 tests testing an obsolete Ecma402 v1 spec (#807)
The following three tests check an obsolete provision in Ecma 402
v1 regarding Intl.{Collator,DateTimeFormat,NumberFormat} constructor
called as a function.

Collator/10.1.2.1_4.js
DateTimeFormat/12.1.2.1_4.js
NumberFormat/11.1.2.1_4.js
2016-12-21 11:11:39 -08:00
jungshik db3aa4ca4f Replace islamicc with islamic-umalqura in getCanonicalLocales/main.js (Intl402) (#789)
* Replace islamicc with islamic-umalqura

Per discussion in #743, it's implementation-dependent how ismalicc is
canonicalized. However, 'islamic-umalqura' should be treated the same
way by all implementations.

* Remove ar-ma-u-ca-islamic-umalqura per discussion
2016-12-19 11:34:35 -08:00
Leo Balter febb11b249 Revert "islamicc should be canonicalized to islamic-civil (#747)" (#774)
This reverts commit da4f4385fd.
2016-10-14 11:05:41 -07:00
jungshik da4f4385fd islamicc should be canonicalized to islamic-civil (#747)
Moves ismalicc test out of main.js and creates a new
test, preferred-subtag.js (per RFC 5646 section 4.5 and
http://www.unicode.org/repos/cldr/tags/latest/common/bcp47/calendar.xml
)

Fix #743
2016-09-12 12:54:55 -07:00
jungshik fb45ed9772 Test that getCanonicalLocales() returns a mutable object. (#746)
Will fix #745

Besides, add additional checks to make sure that getCanonicalLocales()
returns an array.
2016-08-22 14:25:00 -07:00
Zibi Braniecki cac55f2999 NumberFormat.prototype.formatToParts tests, part 1 (#744) 2016-08-15 15:23:34 -07:00
Zibi Braniecki 1bf44eb349 Add DateTimeFormat.prototype.formatToParts tests (#734) 2016-07-28 10:22:09 -07:00
Zibi Braniecki aeb88953f0 Add tests for Intl.getCanonicalLocales 2016-06-07 14:52:04 -04:00
Mike Pennisi eb644bb2da Reduce reliance on `fnGlobalObject.js`
This harness function is not necessary in the majority of cases in which
it is used. Remove its usage to simplify tests and decrease the amount
of domain-specific knowledge necessary to contribute to the test suite.

Persist the harness function itself for use by future tests for ES2015
modules (such a helper is necessary for tests that are interpreted as
module code).
2016-04-25 11:09:21 -07:00
Leonardo Balter bf782c8421 s/id/esid
Fixes #477
2016-02-22 09:47:42 -05:00
André Bargull 31a9036e9b Add coverage for 'name' property of Intl built-in functions 2016-02-12 18:58:57 +01:00
André Bargull 3a30a72269 Add tests for special case mappings 2015-09-07 18:22:07 +02:00
André Bargull 932bd1a12c Move intl tests to sub-folders 2015-07-31 17:12:08 +02:00
André Bargull d5075819e9 Check resolved time zone is valid 2015-07-08 19:13:55 +02:00
André Bargull 438b87b5b6 Intl sub-classing is now restricted to class syntax. 2015-07-08 19:13:31 +02:00
André Bargull 888524ff1d Intl constructors are no longer able to initialize arbitrary objects as Intl objects. Update tests accordingly. 2015-07-08 19:13:06 +02:00
André Bargull b5efa1dd83 Update comments to match correct ES2015 chapter 2015-07-08 19:12:39 +02:00
Brian Terlson 6311f00ce9 Remove enochian-enochian (fixes gh-227) 2015-04-21 15:08:19 -07:00
André Bargull 6aa73b5a2b Changes for currency data
- Update minor unit for CLF
- Remove withdrawn currencies (LVL, LTL, USS)
- Update link to new location

Fixes #98
2015-03-23 18:45:35 +01:00
André Bargull 0dbafac5a6 Add 'var' declarations for strict mode
This change adds 'var' declarations for global variables to allow the tests to run in strict mode (see issue #35).
Extra care was taken to ensure the changes do not alter the test behavior, for example when implicit creation of global variables are part of the test.
Note: The change does not fix all strict mode errors due to missing 'var' declarations.
2014-12-10 16:37:05 -08:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00