mirror of https://github.com/tc39/test262.git
Sync Intl Locale API tests w/ PR67
https://github.com/tc39/proposal-intl-locale-info/pull/67
This commit is contained in:
parent
1bb53aee3e
commit
bba19d51ae
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.calendars
|
||||
description: >
|
||||
Verifies the branding check for the "calendars" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.calendars
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendars");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "calendars" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.calendars
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendars");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "calendars", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.collations
|
||||
description: >
|
||||
Verifies the branding check for the "collations" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.collations
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collations");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.collations
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.collations.
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collations").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get collations",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "collations" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.collations
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collations");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "collations", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getCalendars
|
||||
description: Verifies the branding check for the "getCalendars" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getCalendars ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getCalendars = Intl.Locale.prototype.getCalendars;
|
||||
|
||||
assert.sameValue(typeof getCalendars, "function");
|
||||
|
||||
assert.throws(TypeError, () => getCalendars.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getCalendars.call(null), "null");
|
||||
assert.throws(TypeError, () => getCalendars.call(true), "true");
|
||||
assert.throws(TypeError, () => getCalendars.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getCalendars.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getCalendars.call(1), "1");
|
||||
assert.throws(TypeError, () => getCalendars.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getCalendars.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getCalendars.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -1,21 +1,19 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.weekInfo
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.weekInfo.
|
||||
esid: sec-Intl.Locale.prototype.getCalendars
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getCalendars().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "weekInfo").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get weekInfo",
|
||||
verifyProperty(Intl.Locale.prototype.getCalendars, "name", {
|
||||
value: "getCalendars",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
|
@ -2,9 +2,9 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.calendars
|
||||
esid: sec-intl.locale.prototype.getCalendars
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.calendars is an Array.
|
||||
Checks that the return value of Intl.Locale.prototype.getCalendars is an Array.
|
||||
info: |
|
||||
CalendarsOfLocale ( loc )
|
||||
...
|
||||
|
@ -12,5 +12,5 @@ info: |
|
|||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert(Array.isArray(new Intl.Locale('en').calendars));
|
||||
assert(new Intl.Locale('en').calendars.length > 0, 'array has at least one element');
|
||||
assert(Array.isArray(new Intl.Locale('en').getCalendars()));
|
||||
assert(new Intl.Locale('en').getCalendars().length > 0, 'array has at least one element');
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getCalendars
|
||||
description: Checks the "getCalendars" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getCalendars ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getCalendars,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getCalendars is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getCalendars", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getCollations
|
||||
description: Verifies the branding check for the "getCollations" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getCollations ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getCollations = Intl.Locale.prototype.getCollations;
|
||||
|
||||
assert.sameValue(typeof getCollations, "function");
|
||||
|
||||
assert.throws(TypeError, () => getCollations.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getCollations.call(null), "null");
|
||||
assert.throws(TypeError, () => getCollations.call(true), "true");
|
||||
assert.throws(TypeError, () => getCollations.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getCollations.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getCollations.call(1), "1");
|
||||
assert.throws(TypeError, () => getCollations.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getCollations.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getCollations.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -1,21 +1,19 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.textInfo
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.textInfo.
|
||||
esid: sec-Intl.Locale.prototype.getCollations
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getCollations().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "textInfo").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get textInfo",
|
||||
verifyProperty(Intl.Locale.prototype.getCollations, "name", {
|
||||
value: "getCollations",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
|
@ -17,7 +17,7 @@ info: |
|
|||
features: [Intl.Locale, Intl.Locale-info, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const output = new Intl.Locale('en').collations;
|
||||
const output = new Intl.Locale('en').getCollations();
|
||||
assert(output.length > 0, 'array has at least one element');
|
||||
output.forEach(c => {
|
||||
if(['standard', 'search'].includes(c))
|
|
@ -2,9 +2,9 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.collations
|
||||
esid: sec-intl.locale.prototype.getCollations
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.collations is an Array.
|
||||
Checks that the return value of Intl.Locale.prototype.getCollations is an Array.
|
||||
info: |
|
||||
CollationsOfLocale ( loc )
|
||||
...
|
||||
|
@ -12,4 +12,4 @@ info: |
|
|||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert(Array.isArray(new Intl.Locale('en').collations));
|
||||
assert(Array.isArray(new Intl.Locale('en').getCollations()));
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getCollations
|
||||
description: Checks the "getCollations" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getCollations ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getCollations,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getCollations is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getCollations", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getHourCycles
|
||||
description: Verifies the branding check for the "getHourCycles" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getHourCycles ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getHourCycles = Intl.Locale.prototype.getHourCycles;
|
||||
|
||||
assert.sameValue(typeof getHourCycles, "function");
|
||||
|
||||
assert.throws(TypeError, () => getHourCycles.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getHourCycles.call(null), "null");
|
||||
assert.throws(TypeError, () => getHourCycles.call(true), "true");
|
||||
assert.throws(TypeError, () => getHourCycles.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getHourCycles.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getHourCycles.call(1), "1");
|
||||
assert.throws(TypeError, () => getHourCycles.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getHourCycles.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getHourCycles.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -1,21 +1,19 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.timeZones
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.timeZones.
|
||||
esid: sec-Intl.Locale.prototype.getHourCycles
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getHourCycles().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "timeZones").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get timeZones",
|
||||
verifyProperty(Intl.Locale.prototype.getHourCycles, "name", {
|
||||
value: "getHourCycles",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
|
@ -2,9 +2,9 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.hourCycles
|
||||
esid: sec-intl.locale.prototype.getHourCycles
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.hourCycles is an Array
|
||||
Checks that the return value of Intl.Locale.prototype.getHourCycles is an Array
|
||||
that only contains valid values.
|
||||
info: |
|
||||
HourCyclesOfLocale ( loc )
|
||||
|
@ -16,7 +16,7 @@ info: |
|
|||
features: [Intl.Locale, Intl.Locale-info, Array.prototype.includes]
|
||||
---*/
|
||||
|
||||
const output = new Intl.Locale('en').hourCycles;
|
||||
const output = new Intl.Locale('en').getHourCycles();
|
||||
assert(output.length > 0, 'array has at least one element');
|
||||
output.forEach(hc => {
|
||||
if(!['h11', 'h12', 'h23', 'h24'].includes(hc))
|
|
@ -2,9 +2,9 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.hourCycles
|
||||
esid: sec-intl.locale.prototype.getHourCycles
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.hourCycles is an Array.
|
||||
Checks that the return value of Intl.Locale.prototype.getHourCycles is an Array.
|
||||
info: |
|
||||
HourCyclesOfLocale ( loc )
|
||||
...
|
||||
|
@ -12,4 +12,4 @@ info: |
|
|||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert(Array.isArray(new Intl.Locale('en').hourCycles));
|
||||
assert(Array.isArray(new Intl.Locale('en').getHourCycles()));
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getHourCycles
|
||||
description: Checks the "getHourCycles" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getHourCycles ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getHourCycles,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getHourCycles is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getHourCycles", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getNumberingSystems
|
||||
description: Verifies the branding check for the "getNumberingSystems" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getNumberingSystems ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getNumberingSystems = Intl.Locale.prototype.getNumberingSystems;
|
||||
|
||||
assert.sameValue(typeof getNumberingSystems, "function");
|
||||
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(null), "null");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(true), "true");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(1), "1");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getNumberingSystems.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -1,21 +1,19 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.calendars
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.calendars.
|
||||
esid: sec-Intl.Locale.prototype.getNumberingSystems
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getNumberingSystems().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendars").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get calendars",
|
||||
verifyProperty(Intl.Locale.prototype.getNumberingSystems, "name", {
|
||||
value: "getNumberingSystems",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.getNumberingSystems
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.getNumberingSystems is an Array.
|
||||
info: |
|
||||
NumberingSystemsOfLocale ( loc )
|
||||
...
|
||||
5. Return ! CreateArrayFromListAndPreferred( list, preferred ).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert(Array.isArray(new Intl.Locale('en').getNumberingSystems()));
|
||||
assert(new Intl.Locale('en').getNumberingSystems().length > 0, 'array has at least one element');
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getNumberingSystems
|
||||
description: Checks the "getNumberingSystems" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getNumberingSystems ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getNumberingSystems,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getNumberingSystems is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getNumberingSystems", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getTextInfo
|
||||
description: Verifies the branding check for the "getTextInfo" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getTextInfo ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getTextInfo = Intl.Locale.prototype.getTextInfo;
|
||||
|
||||
assert.sameValue(typeof getTextInfo, "function");
|
||||
|
||||
assert.throws(TypeError, () => getTextInfo.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getTextInfo.call(null), "null");
|
||||
assert.throws(TypeError, () => getTextInfo.call(true), "true");
|
||||
assert.throws(TypeError, () => getTextInfo.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getTextInfo.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getTextInfo.call(1), "1");
|
||||
assert.throws(TypeError, () => getTextInfo.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getTextInfo.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getTextInfo.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getTextInfo
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getTextInfo().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
verifyProperty(Intl.Locale.prototype.getTextInfo, "name", {
|
||||
value: "getTextInfo",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -2,19 +2,19 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.textInfo
|
||||
esid: sec-intl.locale.prototype.getTextInfo
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.textInfo is an Object
|
||||
Checks that the return value of Intl.Locale.prototype.getTextInfo is an Object
|
||||
with the correct keys and properties.
|
||||
info: |
|
||||
get Intl.Locale.prototype.textInfo
|
||||
get Intl.Locale.prototype.getTextInfo
|
||||
...
|
||||
7. Perform ! CreateDataPropertyOrThrow(info, "direction", dir).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
includes: [propertyHelper.js, compareArray.js]
|
||||
---*/
|
||||
|
||||
const result = new Intl.Locale('en').textInfo;
|
||||
const result = new Intl.Locale('en').getTextInfo();
|
||||
|
||||
assert.compareArray(Reflect.ownKeys(result), ['direction']);
|
||||
|
||||
|
@ -24,7 +24,7 @@ verifyProperty(result, 'direction', {
|
|||
configurable: true
|
||||
});
|
||||
|
||||
const direction = new Intl.Locale('en').textInfo.direction;
|
||||
const direction = new Intl.Locale('en').getTextInfo().direction;
|
||||
assert(
|
||||
direction === 'rtl' || direction === 'ltr',
|
||||
'value of the `direction` property'
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.getTextInfo
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.getTextInfo is an Object.
|
||||
info: |
|
||||
get Intl.Locale.prototype.getTextInfo
|
||||
...
|
||||
5. Let info be ! ObjectCreate(%Object.prototype%).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Object.getPrototypeOf(new Intl.Locale('en').getTextInfo()), Object.prototype);
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getTextInfo
|
||||
description: Checks the "getTextInfo" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getTextInfo ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getTextInfo,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getTextInfo is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getTextInfo", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getTimeZones
|
||||
description: Verifies the branding check for the "getTimeZones" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getTimeZones ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getTimeZones = Intl.Locale.prototype.getTimeZones;
|
||||
|
||||
assert.sameValue(typeof getTimeZones, "function");
|
||||
|
||||
assert.throws(TypeError, () => getTimeZones.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getTimeZones.call(null), "null");
|
||||
assert.throws(TypeError, () => getTimeZones.call(true), "true");
|
||||
assert.throws(TypeError, () => getTimeZones.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getTimeZones.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getTimeZones.call(1), "1");
|
||||
assert.throws(TypeError, () => getTimeZones.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getTimeZones.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getTimeZones.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getTimeZones
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getTimeZones().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
verifyProperty(Intl.Locale.prototype.getTimeZones, "name", {
|
||||
value: "getTimeZones",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -2,9 +2,9 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.timeZones
|
||||
esid: sec-intl.locale.prototype.getTimeZones
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.timeZones is a sorted
|
||||
Checks that the return value of Intl.Locale.prototype.getTimeZones is a sorted
|
||||
Array.
|
||||
info: |
|
||||
TimeZonesOfLocale ( loc )
|
||||
|
@ -18,5 +18,5 @@ features: [Intl.Locale,Intl.Locale-info]
|
|||
includes: [compareArray.js]
|
||||
---*/
|
||||
|
||||
const output = new Intl.Locale('en-US').timeZones;
|
||||
const output = new Intl.Locale('en-US').getTimeZones();
|
||||
assert.compareArray(output, [...output].sort());
|
|
@ -2,7 +2,7 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.timeZones
|
||||
esid: sec-intl.locale.prototype.getTimeZones
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.timeZones is undefined
|
||||
when no region subtag is used.
|
||||
|
@ -14,6 +14,4 @@ info: |
|
|||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "timeZones");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
assert.sameValue(new Intl.Locale('en').timeZones, undefined);
|
||||
assert.sameValue(new Intl.Locale('en').getTimeZones(), undefined);
|
|
@ -2,9 +2,9 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.timeZones
|
||||
esid: sec-intl.locale.prototype.getTimeZones
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.timeZones is an Array
|
||||
Checks that the return value of Intl.Locale.prototype.getTimeZones is an Array
|
||||
when a region subtag is used.
|
||||
info: |
|
||||
TimeZonesOfLocale ( loc )
|
||||
|
@ -13,5 +13,5 @@ info: |
|
|||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert(Array.isArray(new Intl.Locale('en-US').timeZones));
|
||||
assert(new Intl.Locale('en-US').timeZones.length > 0, 'array has at least one element');
|
||||
assert(Array.isArray(new Intl.Locale('en-US').getTimeZones()));
|
||||
assert(new Intl.Locale('en-US').getTimeZones().length > 0, 'array has at least one element');
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getTimeZones
|
||||
description: Checks the "getTimeZones" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getTimeZones ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getTimeZones,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getTimeZones is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getTimeZones", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getWeekInfo
|
||||
description: Verifies the branding check for the "getWeekInfo" function of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getWeekInfo ()
|
||||
|
||||
2. Perform ? RequireInternalSlot(loc, [[InitializedLocale]]).
|
||||
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getWeekInfo = Intl.Locale.prototype.getWeekInfo;
|
||||
|
||||
assert.sameValue(typeof getWeekInfo, "function");
|
||||
|
||||
assert.throws(TypeError, () => getWeekInfo.call(undefined), "undefined");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(null), "null");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(true), "true");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(""), "empty string");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(Symbol()), "symbol");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(1), "1");
|
||||
assert.throws(TypeError, () => getWeekInfo.call({}), "plain object");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(Intl.Locale), "Intl.Locale");
|
||||
assert.throws(TypeError, () => getWeekInfo.call(Intl.Locale.prototype), "Intl.Locale.prototype");
|
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getWeekInfo
|
||||
description: Checks the "name" property of Intl.Locale.prototype.getWeekInfo().
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
verifyProperty(Intl.Locale.prototype.getWeekInfo, "name", {
|
||||
value: "getWeekInfo",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -3,19 +3,17 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.weekInfo
|
||||
esid: sec-intl.locale.prototype.getWeekInfo
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.weekInfo is an Object
|
||||
Checks that the return value of Intl.Locale.prototype.getWeekInfo is an Object
|
||||
with the correct keys and properties.
|
||||
info: |
|
||||
get Intl.Locale.prototype.weekInfo
|
||||
get Intl.Locale.prototype.getWeekInfo
|
||||
...
|
||||
7. Perform ! CreateDataPropertyOrThrow(info, "firstDay", wi.[[FirstDay]]).
|
||||
8. Perform ! CreateDataPropertyOrThrow(info, "weekendStart", wi.[[WeekendStart]]).
|
||||
9. Perform ! CreateDataPropertyOrThrow(info, "weekendEnd", wi.[[WeekendEnd]]).
|
||||
10. Perform ! CreateDataPropertyOrThrow(info, "minimalDays", wi.[[MinimalDays]]).
|
||||
6. Perform ! CreateDataPropertyOrThrow(info, "firstDay", wi.[[FirstDay]]).
|
||||
7. Perform ! CreateDataPropertyOrThrow(info, "weekend", we).
|
||||
8. Perform ! CreateDataPropertyOrThrow(info, "minimalDays", wi.[[MinimalDays]]).
|
||||
...
|
||||
|
||||
CreateDataProperty ( O, P, V )
|
||||
...
|
||||
3. Let newDesc be the PropertyDescriptor { [[Value]]: V, [[Writable]]: true,
|
||||
|
@ -24,7 +22,7 @@ features: [Reflect,Intl.Locale,Intl.Locale-info]
|
|||
includes: [propertyHelper.js, compareArray.js]
|
||||
---*/
|
||||
|
||||
const result = new Intl.Locale('en').weekInfo;
|
||||
const result = new Intl.Locale('en').getWeekInfo();
|
||||
function isIntegerBetweenOneAndSeven(value) {
|
||||
return value === 1 || value === 2 || value === 3 || value === 4 || value === 5 || value === 6 || value === 7;
|
||||
}
|
||||
|
@ -37,7 +35,7 @@ verifyProperty(result, 'firstDay', {
|
|||
configurable: true
|
||||
});
|
||||
assert(
|
||||
isIntegerBetweenOneAndSeven(new Intl.Locale('en').weekInfo.firstDay),
|
||||
isIntegerBetweenOneAndSeven(new Intl.Locale('en').getWeekInfo().firstDay),
|
||||
'`firstDay` must be an integer between one and seven (inclusive)'
|
||||
);
|
||||
|
||||
|
@ -47,11 +45,11 @@ verifyProperty(result, 'weekend', {
|
|||
configurable: true
|
||||
});
|
||||
assert(
|
||||
new Intl.Locale('en').weekInfo.weekend.every(isIntegerBetweenOneAndSeven),
|
||||
new Intl.Locale('en').getWeekInfo().weekend.every(isIntegerBetweenOneAndSeven),
|
||||
'`weekend` must include integers between one and seven (inclusive)'
|
||||
);
|
||||
|
||||
let original = new Intl.Locale('en').weekInfo.weekend;
|
||||
let original = new Intl.Locale('en').getWeekInfo().weekend;
|
||||
let sorted = original.slice().sort();
|
||||
assert.compareArray(original, sorted);
|
||||
|
||||
|
@ -61,6 +59,6 @@ verifyProperty(result, 'minimalDays', {
|
|||
configurable: true
|
||||
});
|
||||
assert(
|
||||
isIntegerBetweenOneAndSeven(new Intl.Locale('en').weekInfo.minimalDays),
|
||||
isIntegerBetweenOneAndSeven(new Intl.Locale('en').getWeekInfo().minimalDays),
|
||||
'`minimalDays` must be an integer between one and seven (inclusive)'
|
||||
);
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.getWeekInfo
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.getWeekInfo is an Object.
|
||||
info: |
|
||||
get Intl.Locale.prototype.getWeekInfo
|
||||
...
|
||||
5. Let info be ! ObjectCreate(%Object.prototype%).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Object.getPrototypeOf(new Intl.Locale('en').getWeekInfo()), Object.prototype);
|
|
@ -0,0 +1,25 @@
|
|||
// Copyright 2023 Google Inc. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.getWeekInfo
|
||||
description: Checks the "getWeekInfo" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.getWeekInfo ()
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
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]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(
|
||||
typeof Intl.Locale.prototype.getWeekInfo,
|
||||
"function",
|
||||
"typeof Intl.Locale.prototype.getWeekInfo is function"
|
||||
);
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "getWeekInfo", {
|
||||
writable: true,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.hourCycles
|
||||
description: >
|
||||
Verifies the branding check for the "hourCycles" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.hourCycles
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycles");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.hourCycles
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.hourCycles.
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycles").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get hourCycles",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "hourCycles" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.hourCycles
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycles");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "hourCycles", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.numberingSystems
|
||||
description: >
|
||||
Verifies the branding check for the "numberingSystems" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.numberingSystems
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystems");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.numberingSystems
|
||||
description: >
|
||||
Checks the "name" property of Intl.Locale.prototype.numberingSystems.
|
||||
info: |
|
||||
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 2019 Language Specification, 10th edition, clause 17, or successor.
|
||||
Every built-in function object, including constructors, that is not identified as an anonymous function has a name property whose value is a String. Unless otherwise specified, this value is the name that is given to the function in this specification. Functions that are specified as get or set accessor functions of built-in properties have "get " or "set " prepended to the property name string.
|
||||
Unless otherwise specified, the name property of a built-in function object, if it exists, has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystems").get;
|
||||
verifyProperty(getter, "name", {
|
||||
value: "get numberingSystems",
|
||||
writable: false,
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,16 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.numberingSystems
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.numberingSystems is an Array.
|
||||
info: |
|
||||
NumberingSystemsOfLocale ( loc )
|
||||
...
|
||||
5. Return ! CreateArrayFromListAndPreferred( list, preferred ).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert(Array.isArray(new Intl.Locale('en').numberingSystems));
|
||||
assert(new Intl.Locale('en').numberingSystems.length > 0, 'array has at least one element');
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "numberingSystems" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.numberingSystems
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystems");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "numberingSystems", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.textInfo
|
||||
description: >
|
||||
Verifies the branding check for the "textInfo" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.textInfo
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "textInfo");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.textInfo
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.textInfo is an Object.
|
||||
info: |
|
||||
get Intl.Locale.prototype.textInfo
|
||||
...
|
||||
5. Let info be ! ObjectCreate(%Object.prototype%).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Object.getPrototypeOf(new Intl.Locale('en').textInfo), Object.prototype);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "textInfo" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.textInfo
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "textInfo");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "textInfo", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.timeZones
|
||||
description: >
|
||||
Verifies the branding check for the "timeZones" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.timeZones
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "timeZones");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "timeZones" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.timeZones
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "timeZones");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "timeZones", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-Intl.Locale.prototype.weekInfo
|
||||
description: >
|
||||
Verifies the branding check for the "weekInfo" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.weekInfo
|
||||
|
||||
2. If Type(loc) is not Object or loc does not have an [[InitializedLocale]] internal slot, then
|
||||
a. Throw a TypeError exception.
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "weekInfo");
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
const invalidValues = [
|
||||
undefined,
|
||||
null,
|
||||
true,
|
||||
"",
|
||||
Symbol(),
|
||||
1,
|
||||
{},
|
||||
Intl.Locale.prototype,
|
||||
];
|
||||
|
||||
for (const invalidValue of invalidValues) {
|
||||
assert.throws(TypeError, () => propdesc.get.call(invalidValue));
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale.prototype.weekInfo
|
||||
description: >
|
||||
Checks that the return value of Intl.Locale.prototype.weekInfo is an Object.
|
||||
info: |
|
||||
get Intl.Locale.prototype.weekInfo
|
||||
...
|
||||
5. Let info be ! ObjectCreate(%Object.prototype%).
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
assert.sameValue(Object.getPrototypeOf(new Intl.Locale('en').weekInfo), Object.prototype);
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright 2021 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.locale
|
||||
description: >
|
||||
Checks the "weekInfo" property of the Locale prototype object.
|
||||
info: |
|
||||
Intl.Locale.prototype.weekInfo
|
||||
|
||||
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 2019 script Specification, 10th edition, clause 17, or successor.
|
||||
|
||||
Every accessor property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. If only a get accessor function is described, the set accessor function is the default value, undefined.
|
||||
includes: [propertyHelper.js]
|
||||
features: [Intl.Locale,Intl.Locale-info]
|
||||
---*/
|
||||
|
||||
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "weekInfo");
|
||||
assert.sameValue(propdesc.set, undefined);
|
||||
assert.sameValue(typeof propdesc.get, "function");
|
||||
|
||||
verifyProperty(Intl.Locale.prototype, "weekInfo", {
|
||||
enumerable: false,
|
||||
configurable: true,
|
||||
});
|
Loading…
Reference in New Issue