Merge pull request #1574 from Ms2ger/Locale-getter-name

Add tests for the names of getters on Intl.Locale.prototype.
This commit is contained in:
Rick Waldron 2018-06-04 16:13:47 -04:00 committed by GitHub
commit b0aff0d2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 226 additions and 30 deletions

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.baseName
description: >
Checks the "name" property of Intl.Locale.prototype.baseName.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "baseName").get;
verifyProperty(getter, "name", {
value: "get baseName",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "baseName"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "baseName");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get baseName");
verifyProperty(Intl.Locale.prototype, "baseName", { verifyProperty(Intl.Locale.prototype, "baseName", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.calendar
description: >
Checks the "name" property of Intl.Locale.prototype.calendar.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendar").get;
verifyProperty(getter, "name", {
value: "get calendar",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendar"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendar");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get calendar");
verifyProperty(Intl.Locale.prototype, "calendar", { verifyProperty(Intl.Locale.prototype, "calendar", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,25 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.caseFirst
description: >
Checks the "name" property of Intl.Locale.prototype.caseFirst.
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]
---*/
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "caseFirst");
if (propdesc !== undefined) {
const getter = propdesc.get;
verifyProperty(getter, "name", {
value: "get caseFirst",
writable: false,
enumerable: false,
configurable: true,
});
}

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -21,7 +19,6 @@ const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "caseFir
if (propdesc) { if (propdesc) {
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get caseFirst");
verifyProperty(Intl.Locale.prototype, "caseFirst", { verifyProperty(Intl.Locale.prototype, "caseFirst", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.collation
description: >
Checks the "name" property of Intl.Locale.prototype.collation.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collation").get;
verifyProperty(getter, "name", {
value: "get collation",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collation"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collation");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get collation");
verifyProperty(Intl.Locale.prototype, "collation", { verifyProperty(Intl.Locale.prototype, "collation", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.hourCycle
description: >
Checks the "name" property of Intl.Locale.prototype.hourCycle.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycle").get;
verifyProperty(getter, "name", {
value: "get hourCycle",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycle"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycle");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get hourCycle");
verifyProperty(Intl.Locale.prototype, "hourCycle", { verifyProperty(Intl.Locale.prototype, "hourCycle", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.language
description: >
Checks the "name" property of Intl.Locale.prototype.language.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "language").get;
verifyProperty(getter, "name", {
value: "get language",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "language"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "language");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get language");
verifyProperty(Intl.Locale.prototype, "language", { verifyProperty(Intl.Locale.prototype, "language", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.numberingSystem
description: >
Checks the "name" property of Intl.Locale.prototype.numberingSystem.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystem").get;
verifyProperty(getter, "name", {
value: "get numberingSystem",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystem"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystem");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get numberingSystem");
verifyProperty(Intl.Locale.prototype, "numberingSystem", { verifyProperty(Intl.Locale.prototype, "numberingSystem", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,25 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.numeric
description: >
Checks the "name" property of Intl.Locale.prototype.numeric.
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]
---*/
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric");
if (propdesc !== undefined) {
const getter = propdesc.get;
verifyProperty(getter, "name", {
value: "get numeric",
writable: false,
enumerable: false,
configurable: true,
});
}

View File

@ -10,8 +10,6 @@ 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. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -21,7 +19,6 @@ const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric
if (propdesc) { if (propdesc) {
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get numeric");
verifyProperty(Intl.Locale.prototype, "numeric", { verifyProperty(Intl.Locale.prototype, "numeric", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.region
description: >
Checks the "name" property of Intl.Locale.prototype.region.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "region").get;
verifyProperty(getter, "name", {
value: "get region",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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 ECMAregion objects in the ECMAregion 2019 region Specification, 10th edition, clause 17, or successor. 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 ECMAregion objects in the ECMAregion 2019 region Specification, 10th edition, clause 17, or successor.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "region"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "region");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get region");
verifyProperty(Intl.Locale.prototype, "region", { verifyProperty(Intl.Locale.prototype, "region", {
enumerable: false, enumerable: false,

View File

@ -0,0 +1,22 @@
// Copyright 2018 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-intl.locale.prototype.script
description: >
Checks the "name" property of Intl.Locale.prototype.script.
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]
---*/
const getter = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "script").get;
verifyProperty(getter, "name", {
value: "get script",
writable: false,
enumerable: false,
configurable: true,
});

View File

@ -10,8 +10,6 @@ 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 script Specification, 10th edition, clause 17, or successor. 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.
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 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. 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] includes: [propertyHelper.js]
features: [Intl.Locale] features: [Intl.Locale]
@ -20,7 +18,6 @@ features: [Intl.Locale]
const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "script"); const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "script");
assert.sameValue(propdesc.set, undefined); assert.sameValue(propdesc.set, undefined);
assert.sameValue(typeof propdesc.get, "function"); assert.sameValue(typeof propdesc.get, "function");
assert.sameValue(propdesc.get.name, "get script");
verifyProperty(Intl.Locale.prototype, "script", { verifyProperty(Intl.Locale.prototype, "script", {
enumerable: false, enumerable: false,