Intl.Locale: minor fixups (#1554)

- fix mixed up test & info
- add Symbol feature
- maximize length is 0
- maximize configurability is true
This commit is contained in:
Rick Waldron 2018-05-11 15:37:52 -04:00 committed by Leo Balter
parent b77a262b4c
commit e845e21bf5
4 changed files with 22 additions and 15 deletions

View File

@ -9,7 +9,7 @@ info: |
Intl.Locale( tag [, options] )
7. If Type(tag) is not String or Object, throw a TypeError exception.
features: [Intl.Locale]
features: [Intl.Locale, Symbol]
---*/
assert.throws(TypeError, function() {

View File

@ -4,23 +4,30 @@
/*---
esid: sec-intl.locale
description: >
The value of the [[Prototype]] internal slot of the Intl.Locale constructor is the
intrinsic object %FunctionPrototype%.
"Locale" property of Intl.
info: |
The value of Intl.Locale.prototype is %LocalePrototype%.
Intl.Locale (...)
This property has the attributes
{ [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }.
7 Requirements for Standard Built-in ECMAScript Objects
Unless specified otherwise in this document, the objects, functions, and constructors
described in this standard are subject to the generic requirements and restrictions
specified for standard built-in ECMAScript objects in the ECMAScript 2018 Language
Specification, 9th edition, clause 17, or successor.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has the
attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
features: [Intl.Locale]
---*/
assert.sameValue(typeof Intl.Locale, "function", "typeof Intl.Locale is function");
verifyProperty(Intl, "Locale", {
value: Intl.Locale,
writable: false,
writable: true,
enumerable: false,
configurable: false,
configurable: true,
});

View File

@ -15,7 +15,7 @@ features: [Intl.Locale]
---*/
verifyProperty(Intl.Locale.prototype.maximize, 'length', {
value: 1,
value: 0,
writable: false,
enumerable: false,
configurable: true

View File

@ -16,14 +16,14 @@ features: [Intl.Locale]
---*/
assert.sameValue(
typeof Intl.Locale.prototype.maximize,
'function',
"typeof Intl.Locale.prototype.maximize is function"
typeof Intl.Locale.prototype.maximize,
'function',
'typeof Intl.Locale.prototype.maximize is function'
);
verifyProperty(Intl.Locale.prototype, 'maximize', {
writable: true,
enumerable: false,
configurable: false,
configurable: true,
});