mirror of https://github.com/tc39/test262.git
Add separate test files for property attributes of Intl properties
This commit is contained in:
parent
513a3056fb
commit
4337b396bd
|
@ -11,12 +11,10 @@ description: |
|
|||
* @param {Object} obj the object to be tested.
|
||||
* @param {boolean} isFunction whether the specification describes obj as a function.
|
||||
* @param {boolean} isConstructor whether the specification describes obj as a constructor.
|
||||
* @param {String[]} properties an array with the names of the built-in properties of obj,
|
||||
* excluding length, prototype, or properties with non-default attributes.
|
||||
* @author Norbert Lindenberg
|
||||
*/
|
||||
|
||||
function testBuiltInObject(obj, isFunction, isConstructor, properties) {
|
||||
function testBuiltInObject(obj, isFunction, isConstructor) {
|
||||
|
||||
if (obj === undefined) {
|
||||
$ERROR("Object being tested is undefined.");
|
||||
|
@ -47,34 +45,6 @@ function testBuiltInObject(obj, isFunction, isConstructor, properties) {
|
|||
$ERROR("Built-in prototype objects must have Object.prototype as their prototype.");
|
||||
}
|
||||
|
||||
// verification of the absence of the [[Construct]] internal property has
|
||||
// been moved to the end of the test
|
||||
|
||||
// verification of the absence of the prototype property has
|
||||
// been moved to the end of the test
|
||||
|
||||
properties.forEach(function(prop) {
|
||||
var desc = Object.getOwnPropertyDescriptor(obj, prop);
|
||||
if (desc === undefined) {
|
||||
$ERROR("Missing property " + prop + ".");
|
||||
}
|
||||
// accessor properties don't have writable attribute
|
||||
if (desc.hasOwnProperty("writable") && !desc.writable) {
|
||||
$ERROR("The " + prop + " property of this built-in object must be writable.");
|
||||
}
|
||||
if (desc.enumerable) {
|
||||
$ERROR("The " + prop + " property of this built-in object must not be enumerable.");
|
||||
}
|
||||
if (!desc.configurable) {
|
||||
$ERROR("The " + prop + " property of this built-in object must be configurable.");
|
||||
}
|
||||
});
|
||||
|
||||
// The remaining sections have been moved to the end of the test because
|
||||
// unbound non-constructor functions written in JavaScript cannot possibly
|
||||
// pass them, and we still want to test JavaScript implementations as much
|
||||
// as possible.
|
||||
|
||||
var exception;
|
||||
if (isFunction && !isConstructor) {
|
||||
// this is not a complete test for the presence of [[Construct]]:
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.Collator, true, true, ["supportedLocalesOf"]);
|
||||
testBuiltInObject(Intl.Collator, true, true);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.collator-intro
|
||||
description: >
|
||||
"Collator" property of Intl.
|
||||
info: |
|
||||
Intl.Collator (...)
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl, "Collator");
|
||||
verifyWritable(Intl, "Collator");
|
||||
verifyConfigurable(Intl, "Collator");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.Collator.prototype, false, false, ["constructor", "compare", "resolvedOptions"]);
|
||||
testBuiltInObject(Intl.Collator.prototype, false, false);
|
||||
|
|
|
@ -12,4 +12,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(new Intl.Collator().compare, true, false, []);
|
||||
testBuiltInObject(new Intl.Collator().compare, true, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get , true, false, []);
|
||||
testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get , true, false);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.collator.prototype.resolvedoptions
|
||||
description: >
|
||||
"compare" property of Intl.Collator.prototype.
|
||||
info: |
|
||||
get Intl.Collator.prototype.compare
|
||||
|
||||
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 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. If only a set accessor is described the get accessor is the default
|
||||
value, undefined.
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(Intl.Collator.prototype, "compare");
|
||||
verifyConfigurable(Intl.Collator.prototype, "compare");
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.collator.prototype.constructor
|
||||
description: >
|
||||
"constructor" property of Intl.Collator.prototype.
|
||||
info: |
|
||||
Intl.Collator.prototype.constructor
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.Collator.prototype, "constructor");
|
||||
verifyWritable(Intl.Collator.prototype, "constructor");
|
||||
verifyConfigurable(Intl.Collator.prototype, "constructor");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.Collator.prototype.resolvedOptions, true, false, []);
|
||||
testBuiltInObject(Intl.Collator.prototype.resolvedOptions, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.collator.prototype.resolvedoptions
|
||||
description: >
|
||||
"resolvedOptions" property of Intl.Collator.prototype.
|
||||
info: |
|
||||
Intl.Collator.prototype.resolvedOptions ()
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.Collator.prototype, "resolvedOptions");
|
||||
verifyWritable(Intl.Collator.prototype, "resolvedOptions");
|
||||
verifyConfigurable(Intl.Collator.prototype, "resolvedOptions");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.Collator.supportedLocalesOf, true, false, []);
|
||||
testBuiltInObject(Intl.Collator.supportedLocalesOf, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.collator.supportedlocalesof
|
||||
description: >
|
||||
"supportedLocalesOf" property of Intl.Collator.
|
||||
info: |
|
||||
Intl.Collator.supportedLocalesOf ( locales [ , options ] )
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.Collator, "supportedLocalesOf");
|
||||
verifyWritable(Intl.Collator, "supportedLocalesOf");
|
||||
verifyConfigurable(Intl.Collator, "supportedLocalesOf");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Date.prototype.toLocaleDateString, true, false, []);
|
||||
testBuiltInObject(Date.prototype.toLocaleDateString, true, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Date.prototype.toLocaleString, true, false, []);
|
||||
testBuiltInObject(Date.prototype.toLocaleString, true, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Date.prototype.toLocaleTimeString, true, false, []);
|
||||
testBuiltInObject(Date.prototype.toLocaleTimeString, true, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.DateTimeFormat, true, true, ["supportedLocalesOf"]);
|
||||
testBuiltInObject(Intl.DateTimeFormat, true, true);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.datetimeformat-intro
|
||||
description: >
|
||||
"DateTimeFormat" property of Intl.
|
||||
info: |
|
||||
Intl.DateTimeFormat (...)
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl, "DateTimeFormat");
|
||||
verifyWritable(Intl, "DateTimeFormat");
|
||||
verifyConfigurable(Intl, "DateTimeFormat");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.DateTimeFormat.prototype, false, false, ["constructor", "format", "resolvedOptions"]);
|
||||
testBuiltInObject(Intl.DateTimeFormat.prototype, false, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.datetimeformat.prototype.constructor
|
||||
description: >
|
||||
"constructor" property of Intl.DateTimeFormat.prototype.
|
||||
info: |
|
||||
Intl.DateTimeFormat.prototype.constructor
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, "constructor");
|
||||
verifyWritable(Intl.DateTimeFormat.prototype, "constructor");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, "constructor");
|
|
@ -12,4 +12,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(new Intl.DateTimeFormat().format, true, false, []);
|
||||
testBuiltInObject(new Intl.DateTimeFormat().format, true, false);
|
||||
|
|
|
@ -12,4 +12,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get , true, false, []);
|
||||
testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get , true, false);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.datetimeformat.prototype.format
|
||||
description: >
|
||||
"format" property of Intl.DateTimeFormat.prototype.
|
||||
info: |
|
||||
get Intl.DateTimeFormat.prototype.format
|
||||
|
||||
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 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. If only a set accessor is described the get accessor is the default
|
||||
value, undefined.
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, "format");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, "format");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.DateTimeFormat.prototype.resolvedOptions, true, false, []);
|
||||
testBuiltInObject(Intl.DateTimeFormat.prototype.resolvedOptions, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.datetimeformat.prototype.resolvedoptions
|
||||
description: >
|
||||
"resolvedOptions" property of Intl.DateTimeFormat.prototype.
|
||||
info: |
|
||||
Intl.DateTimeFormat.prototype.resolvedOptions ()
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat.prototype, "resolvedOptions");
|
||||
verifyWritable(Intl.DateTimeFormat.prototype, "resolvedOptions");
|
||||
verifyConfigurable(Intl.DateTimeFormat.prototype, "resolvedOptions");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.DateTimeFormat.supportedLocalesOf, true, false, []);
|
||||
testBuiltInObject(Intl.DateTimeFormat.supportedLocalesOf, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.datetimeformat.supportedlocalesof
|
||||
description: >
|
||||
"supportedLocalesOf" property of Intl.DateTimeFormat.
|
||||
info: |
|
||||
Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] )
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.DateTimeFormat, "supportedLocalesOf");
|
||||
verifyWritable(Intl.DateTimeFormat, "supportedLocalesOf");
|
||||
verifyConfigurable(Intl.DateTimeFormat, "supportedLocalesOf");
|
|
@ -11,5 +11,5 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(this.Intl, false, false, []);
|
||||
testBuiltInObject(Intl, false, false, ["Collator", "NumberFormat", "DateTimeFormat"]);
|
||||
testBuiltInObject(this.Intl, false, false);
|
||||
testBuiltInObject(Intl, false, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Number.prototype.toLocaleString, true, false, []);
|
||||
testBuiltInObject(Number.prototype.toLocaleString, true, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.NumberFormat, true, true, ["supportedLocalesOf"]);
|
||||
testBuiltInObject(Intl.NumberFormat, true, true);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat-intro
|
||||
description: >
|
||||
"NumberFormat" property of Intl.
|
||||
info: |
|
||||
Intl.NumberFormat (...)
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl, "NumberFormat");
|
||||
verifyWritable(Intl, "NumberFormat");
|
||||
verifyConfigurable(Intl, "NumberFormat");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.NumberFormat.prototype, false, false, ["constructor", "format", "resolvedOptions"]);
|
||||
testBuiltInObject(Intl.NumberFormat.prototype, false, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat.prototype.constructor
|
||||
description: >
|
||||
"constructor" property of Intl.NumberFormat.prototype.
|
||||
info: |
|
||||
Intl.NumberFormat.prototype.constructor
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.NumberFormat.prototype, "constructor");
|
||||
verifyWritable(Intl.NumberFormat.prototype, "constructor");
|
||||
verifyConfigurable(Intl.NumberFormat.prototype, "constructor");
|
|
@ -12,4 +12,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(new Intl.NumberFormat().format, true, false, []);
|
||||
testBuiltInObject(new Intl.NumberFormat().format, true, false);
|
||||
|
|
|
@ -12,4 +12,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get , true, false, []);
|
||||
testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get , true, false);
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat.prototype.format
|
||||
description: >
|
||||
"format" property of Intl.NumberFormat.prototype.
|
||||
info: |
|
||||
get Intl.NumberFormat.prototype.format
|
||||
|
||||
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 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. If only a set accessor is described the get accessor is the default
|
||||
value, undefined.
|
||||
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var desc = Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format");
|
||||
|
||||
assert.sameValue(desc.set, undefined);
|
||||
assert.sameValue(typeof desc.get, "function");
|
||||
|
||||
verifyNotEnumerable(Intl.NumberFormat.prototype, "format");
|
||||
verifyConfigurable(Intl.NumberFormat.prototype, "format");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.NumberFormat.prototype.resolvedOptions, true, false, []);
|
||||
testBuiltInObject(Intl.NumberFormat.prototype.resolvedOptions, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat.prototype.resolvedoptions
|
||||
description: >
|
||||
"resolvedOptions" property of Intl.NumberFormat.prototype.
|
||||
info: |
|
||||
Intl.NumberFormat.prototype.resolvedOptions ()
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.NumberFormat.prototype, "resolvedOptions");
|
||||
verifyWritable(Intl.NumberFormat.prototype, "resolvedOptions");
|
||||
verifyConfigurable(Intl.NumberFormat.prototype, "resolvedOptions");
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.NumberFormat.supportedLocalesOf, true, false, []);
|
||||
testBuiltInObject(Intl.NumberFormat.supportedLocalesOf, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.numberformat.supportedlocalesof
|
||||
description: >
|
||||
"supportedLocalesOf" property of Intl.NumberFormat.
|
||||
info: |
|
||||
Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] )
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.NumberFormat, "supportedLocalesOf");
|
||||
verifyWritable(Intl.NumberFormat, "supportedLocalesOf");
|
||||
verifyConfigurable(Intl.NumberFormat, "supportedLocalesOf");
|
|
@ -11,4 +11,4 @@ author: Zibi Braniecki
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.PluralRules, true, true, ["supportedLocalesOf"]);
|
||||
testBuiltInObject(Intl.PluralRules, true, true);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Zibi Braniecki
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.PluralRules.prototype, false, false, ["constructor", "select", "resolvedOptions"]);
|
||||
testBuiltInObject(Intl.PluralRules.prototype, false, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.pluralrules.prototype.constructor
|
||||
description: >
|
||||
"constructor" property of Intl.PluralRules.prototype.
|
||||
info: |
|
||||
Intl.PluralRules.prototype.constructor
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.PluralRules.prototype, "constructor");
|
||||
verifyWritable(Intl.PluralRules.prototype, "constructor");
|
||||
verifyConfigurable(Intl.PluralRules.prototype, "constructor");
|
|
@ -11,4 +11,4 @@ author: Zibi Braniecki
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.PluralRules.prototype.resolvedOptions, true, false, []);
|
||||
testBuiltInObject(Intl.PluralRules.prototype.resolvedOptions, true, false);
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.pluralrules.prototype.resolvedoptions
|
||||
description: >
|
||||
"resolvedOptions" property of Intl.PluralRules.prototype.
|
||||
info: |
|
||||
Intl.PluralRules.prototype.resolvedOptions ()
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.PluralRules.prototype, "resolvedOptions");
|
||||
verifyWritable(Intl.PluralRules.prototype, "resolvedOptions");
|
||||
verifyConfigurable(Intl.PluralRules.prototype, "resolvedOptions");
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.pluralrules.prototype.select
|
||||
description: >
|
||||
"select" property of Intl.PluralRules.prototype.
|
||||
info: |
|
||||
Intl.PluralRules.prototype.select( value )
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.PluralRules.prototype, "select");
|
||||
verifyWritable(Intl.PluralRules.prototype, "select");
|
||||
verifyConfigurable(Intl.PluralRules.prototype, "select");
|
|
@ -0,0 +1,29 @@
|
|||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-intl.pluralrules.supportedlocalesof
|
||||
description: >
|
||||
"supportedLocalesOf" property of Intl.PluralRules.
|
||||
info: |
|
||||
Intl.PluralRules.supportedLocalesOf ( locales [ , options ] )
|
||||
|
||||
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]
|
||||
---*/
|
||||
|
||||
verifyNotEnumerable(Intl.PluralRules, "supportedLocalesOf");
|
||||
verifyWritable(Intl.PluralRules, "supportedLocalesOf");
|
||||
verifyConfigurable(Intl.PluralRules, "supportedLocalesOf");
|
|
@ -11,4 +11,4 @@ author: Zibi Braniecki
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(Intl.PluralRules.supportedLocalesOf, true, false, []);
|
||||
testBuiltInObject(Intl.PluralRules.supportedLocalesOf, true, false);
|
||||
|
|
|
@ -11,4 +11,4 @@ author: Norbert Lindenberg
|
|||
includes: [testBuiltInObject.js]
|
||||
---*/
|
||||
|
||||
testBuiltInObject(String.prototype.localeCompare, true, false, []);
|
||||
testBuiltInObject(String.prototype.localeCompare, true, false);
|
||||
|
|
Loading…
Reference in New Issue