From 4dbd18197e607facccf678375984d80c9c1dfb9f Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Tue, 29 May 2018 15:23:11 +0200 Subject: [PATCH] Add tests for the names of getters on Intl.Locale.prototype. --- .../intl402/Locale/prototype/baseName/name.js | 22 ++++++++++++++++ .../Locale/prototype/baseName/prop-desc.js | 3 --- .../intl402/Locale/prototype/calendar/name.js | 22 ++++++++++++++++ .../Locale/prototype/calendar/prop-desc.js | 3 --- .../Locale/prototype/caseFirst/name.js | 25 +++++++++++++++++++ .../Locale/prototype/caseFirst/prop-desc.js | 3 --- .../Locale/prototype/collation/name.js | 22 ++++++++++++++++ .../Locale/prototype/collation/prop-desc.js | 3 --- .../Locale/prototype/hourCycle/name.js | 22 ++++++++++++++++ .../Locale/prototype/hourCycle/prop-desc.js | 3 --- .../intl402/Locale/prototype/language/name.js | 22 ++++++++++++++++ .../Locale/prototype/language/prop-desc.js | 3 --- .../Locale/prototype/numberingSystem/name.js | 22 ++++++++++++++++ .../prototype/numberingSystem/prop-desc.js | 3 --- test/intl402/Locale/prototype/numeric/name.js | 25 +++++++++++++++++++ .../Locale/prototype/numeric/prop-desc.js | 3 --- test/intl402/Locale/prototype/region/name.js | 22 ++++++++++++++++ .../Locale/prototype/region/prop-desc.js | 3 --- test/intl402/Locale/prototype/script/name.js | 22 ++++++++++++++++ .../Locale/prototype/script/prop-desc.js | 3 --- 20 files changed, 226 insertions(+), 30 deletions(-) create mode 100644 test/intl402/Locale/prototype/baseName/name.js create mode 100644 test/intl402/Locale/prototype/calendar/name.js create mode 100644 test/intl402/Locale/prototype/caseFirst/name.js create mode 100644 test/intl402/Locale/prototype/collation/name.js create mode 100644 test/intl402/Locale/prototype/hourCycle/name.js create mode 100644 test/intl402/Locale/prototype/language/name.js create mode 100644 test/intl402/Locale/prototype/numberingSystem/name.js create mode 100644 test/intl402/Locale/prototype/numeric/name.js create mode 100644 test/intl402/Locale/prototype/region/name.js create mode 100644 test/intl402/Locale/prototype/script/name.js diff --git a/test/intl402/Locale/prototype/baseName/name.js b/test/intl402/Locale/prototype/baseName/name.js new file mode 100644 index 0000000000..98a23657ea --- /dev/null +++ b/test/intl402/Locale/prototype/baseName/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/baseName/prop-desc.js b/test/intl402/Locale/prototype/baseName/prop-desc.js index 8c3be4bfc0..21cdfa6272 100644 --- a/test/intl402/Locale/prototype/baseName/prop-desc.js +++ b/test/intl402/Locale/prototype/baseName/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "baseName"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get baseName"); verifyProperty(Intl.Locale.prototype, "baseName", { enumerable: false, diff --git a/test/intl402/Locale/prototype/calendar/name.js b/test/intl402/Locale/prototype/calendar/name.js new file mode 100644 index 0000000000..5fb5d3cd44 --- /dev/null +++ b/test/intl402/Locale/prototype/calendar/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/calendar/prop-desc.js b/test/intl402/Locale/prototype/calendar/prop-desc.js index df376f92c4..7e79a8bdd8 100644 --- a/test/intl402/Locale/prototype/calendar/prop-desc.js +++ b/test/intl402/Locale/prototype/calendar/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "calendar"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get calendar"); verifyProperty(Intl.Locale.prototype, "calendar", { enumerable: false, diff --git a/test/intl402/Locale/prototype/caseFirst/name.js b/test/intl402/Locale/prototype/caseFirst/name.js new file mode 100644 index 0000000000..15b29d837f --- /dev/null +++ b/test/intl402/Locale/prototype/caseFirst/name.js @@ -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, + }); +} diff --git a/test/intl402/Locale/prototype/caseFirst/prop-desc.js b/test/intl402/Locale/prototype/caseFirst/prop-desc.js index ad370db8b4..413c603a87 100644 --- a/test/intl402/Locale/prototype/caseFirst/prop-desc.js +++ b/test/intl402/Locale/prototype/caseFirst/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -21,7 +19,6 @@ const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "caseFir if (propdesc) { assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); - assert.sameValue(propdesc.get.name, "get caseFirst"); verifyProperty(Intl.Locale.prototype, "caseFirst", { enumerable: false, diff --git a/test/intl402/Locale/prototype/collation/name.js b/test/intl402/Locale/prototype/collation/name.js new file mode 100644 index 0000000000..181b076078 --- /dev/null +++ b/test/intl402/Locale/prototype/collation/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/collation/prop-desc.js b/test/intl402/Locale/prototype/collation/prop-desc.js index 243559abb9..07365e9231 100644 --- a/test/intl402/Locale/prototype/collation/prop-desc.js +++ b/test/intl402/Locale/prototype/collation/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "collation"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get collation"); verifyProperty(Intl.Locale.prototype, "collation", { enumerable: false, diff --git a/test/intl402/Locale/prototype/hourCycle/name.js b/test/intl402/Locale/prototype/hourCycle/name.js new file mode 100644 index 0000000000..51ff3278a1 --- /dev/null +++ b/test/intl402/Locale/prototype/hourCycle/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/hourCycle/prop-desc.js b/test/intl402/Locale/prototype/hourCycle/prop-desc.js index 72275a3e32..c8786a2687 100644 --- a/test/intl402/Locale/prototype/hourCycle/prop-desc.js +++ b/test/intl402/Locale/prototype/hourCycle/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "hourCycle"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get hourCycle"); verifyProperty(Intl.Locale.prototype, "hourCycle", { enumerable: false, diff --git a/test/intl402/Locale/prototype/language/name.js b/test/intl402/Locale/prototype/language/name.js new file mode 100644 index 0000000000..01779bdc2c --- /dev/null +++ b/test/intl402/Locale/prototype/language/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/language/prop-desc.js b/test/intl402/Locale/prototype/language/prop-desc.js index 2b7eacaaba..5c17bbf542 100644 --- a/test/intl402/Locale/prototype/language/prop-desc.js +++ b/test/intl402/Locale/prototype/language/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "language"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get language"); verifyProperty(Intl.Locale.prototype, "language", { enumerable: false, diff --git a/test/intl402/Locale/prototype/numberingSystem/name.js b/test/intl402/Locale/prototype/numberingSystem/name.js new file mode 100644 index 0000000000..bd62c802d4 --- /dev/null +++ b/test/intl402/Locale/prototype/numberingSystem/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/numberingSystem/prop-desc.js b/test/intl402/Locale/prototype/numberingSystem/prop-desc.js index d8f4d24746..84d5c4ca15 100644 --- a/test/intl402/Locale/prototype/numberingSystem/prop-desc.js +++ b/test/intl402/Locale/prototype/numberingSystem/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numberingSystem"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get numberingSystem"); verifyProperty(Intl.Locale.prototype, "numberingSystem", { enumerable: false, diff --git a/test/intl402/Locale/prototype/numeric/name.js b/test/intl402/Locale/prototype/numeric/name.js new file mode 100644 index 0000000000..0634a4fec2 --- /dev/null +++ b/test/intl402/Locale/prototype/numeric/name.js @@ -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, + }); +} diff --git a/test/intl402/Locale/prototype/numeric/prop-desc.js b/test/intl402/Locale/prototype/numeric/prop-desc.js index 6772aeb60f..05e4d442b7 100644 --- a/test/intl402/Locale/prototype/numeric/prop-desc.js +++ b/test/intl402/Locale/prototype/numeric/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -21,7 +19,6 @@ const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "numeric if (propdesc) { assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); - assert.sameValue(propdesc.get.name, "get numeric"); verifyProperty(Intl.Locale.prototype, "numeric", { enumerable: false, diff --git a/test/intl402/Locale/prototype/region/name.js b/test/intl402/Locale/prototype/region/name.js new file mode 100644 index 0000000000..b047e08753 --- /dev/null +++ b/test/intl402/Locale/prototype/region/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/region/prop-desc.js b/test/intl402/Locale/prototype/region/prop-desc.js index f361c50d5c..45f4186549 100644 --- a/test/intl402/Locale/prototype/region/prop-desc.js +++ b/test/intl402/Locale/prototype/region/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "region"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get region"); verifyProperty(Intl.Locale.prototype, "region", { enumerable: false, diff --git a/test/intl402/Locale/prototype/script/name.js b/test/intl402/Locale/prototype/script/name.js new file mode 100644 index 0000000000..b6364b8e2c --- /dev/null +++ b/test/intl402/Locale/prototype/script/name.js @@ -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, +}); diff --git a/test/intl402/Locale/prototype/script/prop-desc.js b/test/intl402/Locale/prototype/script/prop-desc.js index def9002642..6d8e605f1d 100644 --- a/test/intl402/Locale/prototype/script/prop-desc.js +++ b/test/intl402/Locale/prototype/script/prop-desc.js @@ -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. - 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. includes: [propertyHelper.js] features: [Intl.Locale] @@ -20,7 +18,6 @@ features: [Intl.Locale] const propdesc = Object.getOwnPropertyDescriptor(Intl.Locale.prototype, "script"); assert.sameValue(propdesc.set, undefined); assert.sameValue(typeof propdesc.get, "function"); -assert.sameValue(propdesc.get.name, "get script"); verifyProperty(Intl.Locale.prototype, "script", { enumerable: false,