mirror of https://github.com/tc39/test262.git
Intl: PluralRules, NumberFormat, Number & getCanonicalLocales to use verifyProperty
There's a lot of work like this to do, but not enough time in the day to reach it all.
This commit is contained in:
parent
50de5f98ab
commit
fbccd8eeff
|
@ -15,6 +15,8 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl, "getCanonicalLocales");
|
||||
verifyWritable(Intl, "getCanonicalLocales");
|
||||
verifyConfigurable(Intl, "getCanonicalLocales");
|
||||
verifyProperty(Intl, 'getCanonicalLocales', {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
||||
|
|
|
@ -15,5 +15,5 @@ assert(compareArray(
|
|||
Intl.getCanonicalLocales(
|
||||
['ab-cd', 'ff', 'de-rt', 'ab-Cd']), ['ab-CD', 'ff', 'de-RT']));
|
||||
|
||||
var locales = Intl.getCanonicalLocales(["en-US", "en-US"]);
|
||||
var locales = Intl.getCanonicalLocales(['en-US', 'en-US']);
|
||||
assert(compareArray(locales, ['en-US']), 'en-US');
|
||||
|
|
|
@ -24,8 +24,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Number.prototype.toLocaleString.length, 0);
|
||||
|
||||
verifyNotEnumerable(Number.prototype.toLocaleString, "length");
|
||||
verifyNotWritable(Number.prototype.toLocaleString, "length");
|
||||
verifyConfigurable(Number.prototype.toLocaleString, "length");
|
||||
verifyProperty(Number.prototype.toLocaleString, 'length', {
|
||||
value: 0,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -29,3 +29,10 @@ assert.sameValue(Intl.NumberFormat.length, 0);
|
|||
verifyNotEnumerable(Intl.NumberFormat, "length");
|
||||
verifyNotWritable(Intl.NumberFormat, "length");
|
||||
verifyConfigurable(Intl.NumberFormat, "length");
|
||||
|
||||
verifyProperty(Intl.NumberFormat, 'length', {
|
||||
value: 0,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -19,8 +19,9 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.NumberFormat.name, "NumberFormat");
|
||||
|
||||
verifyNotEnumerable(Intl.NumberFormat, "name");
|
||||
verifyNotWritable(Intl.NumberFormat, "name");
|
||||
verifyConfigurable(Intl.NumberFormat, "name");
|
||||
verifyProperty(Intl.NumberFormat, 'name', {
|
||||
value: 'NumberFormat',
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -24,6 +24,8 @@ info: |
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl, "NumberFormat");
|
||||
verifyWritable(Intl, "NumberFormat");
|
||||
verifyConfigurable(Intl, "NumberFormat");
|
||||
verifyProperty(Intl, 'NumberFormat', {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -8,8 +8,9 @@ author: Zibi Braniecki
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.PluralRules.length, 0);
|
||||
|
||||
verifyNotEnumerable(Intl.PluralRules, "length");
|
||||
verifyNotWritable(Intl.PluralRules, "length");
|
||||
verifyConfigurable(Intl.PluralRules, "length");
|
||||
verifyProperty(Intl.PluralRules, 'length', {
|
||||
value: 0,
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -8,8 +8,9 @@ author: Zibi Braniecki
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Intl.PluralRules.name, "PluralRules");
|
||||
|
||||
verifyNotEnumerable(Intl.PluralRules, "name");
|
||||
verifyNotWritable(Intl.PluralRules, "name");
|
||||
verifyConfigurable(Intl.PluralRules, "name");
|
||||
verifyProperty(Intl.PluralRules, 'name', {
|
||||
value: 'PluralRules',
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.PluralRules
|
||||
description: >
|
||||
"PluralRules" property of Intl.
|
||||
info: |
|
||||
Intl.PluralRules (...)
|
||||
|
||||
7 Requirements for Standard Built-in ECMAScript Objects
|
||||
|
||||
Unless specified otherwise in this document, the objects, functions, and constructors
|
||||
described in this standard are subject to the generic requirements and restrictions
|
||||
specified for standard built-in ECMAScript objects in the ECMAScript 2018 Language
|
||||
Specification, 9th edition, clause 17, or successor.
|
||||
|
||||
17 ECMAScript Standard Built-in Objects:
|
||||
|
||||
Every other data property described in clauses 18 through 26 and in Annex B.2 has the
|
||||
attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
|
||||
unless otherwise specified.
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
verifyProperty(Intl, 'PluralRules', {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
Loading…
Reference in New Issue