diff --git a/harness/testBuiltInObject.js b/harness/testBuiltInObject.js index c78c0d732ab44d84282b3ee681b66efb696135ec..95fa2d3f6bbb47f9fc66c186d91021b6a8fdbe11 100644 --- a/harness/testBuiltInObject.js +++ b/harness/testBuiltInObject.js @@ -13,12 +13,10 @@ description: | * @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. - * @param {number} length for functions only: the length specified for the function - * or derived from the argument list. * @author Norbert Lindenberg */ -function testBuiltInObject(obj, isFunction, isConstructor, properties, length) { +function testBuiltInObject(obj, isFunction, isConstructor, properties) { if (obj === undefined) { $ERROR("Object being tested is undefined."); @@ -55,29 +53,6 @@ function testBuiltInObject(obj, isFunction, isConstructor, properties, length) { // verification of the absence of the prototype property has // been moved to the end of the test - if (isFunction) { - - if (typeof obj.length !== "number" || obj.length !== Math.floor(obj.length)) { - $ERROR("Built-in functions must have a length property with an integer value."); - } - - if (obj.length !== length) { - $ERROR("Function's length property doesn't have specified value; expected " + - length + ", got " + obj.length + "."); - } - - var desc = Object.getOwnPropertyDescriptor(obj, "length"); - if (desc.writable) { - $ERROR("The length property of a built-in function must not be writable."); - } - if (desc.enumerable) { - $ERROR("The length property of a built-in function must not be enumerable."); - } - if (!desc.configurable) { - $ERROR("The length property of a built-in function must be configurable."); - } - } - properties.forEach(function(prop) { var desc = Object.getOwnPropertyDescriptor(obj, prop); if (desc === undefined) { diff --git a/test/intl402/Collator/10.1_L15.js b/test/intl402/Collator/10.1_L15.js index 3446d7cfe05e01baa8f1518b8136ade415c19824..2f08ccd2af812e8c8b8379cd0552171a0d4ea512 100644 --- a/test/intl402/Collator/10.1_L15.js +++ b/test/intl402/Collator/10.1_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.Collator, true, true, ["supportedLocalesOf"], 0); +testBuiltInObject(Intl.Collator, true, true, ["supportedLocalesOf"]); diff --git a/test/intl402/Collator/length.js b/test/intl402/Collator/length.js new file mode 100644 index 0000000000000000000000000000000000000000..7ac33bce9ea7a68a9ae0e72e119067f348e9dc7e --- /dev/null +++ b/test/intl402/Collator/length.js @@ -0,0 +1,31 @@ +// 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 +description: > + Intl.Collator.length is 0. +info: | + Intl.Collator ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.Collator.length, 0); + +verifyNotEnumerable(Intl.Collator, "length"); +verifyNotWritable(Intl.Collator, "length"); +verifyConfigurable(Intl.Collator, "length"); diff --git a/test/intl402/Collator/prototype/compare/10.3.2_1_a_L15.js b/test/intl402/Collator/prototype/compare/10.3.2_1_a_L15.js index 657845eaac9ef37b1626de8bc669bdb48c33d8cd..6f5920e7beef009dc768f309ab2148aed6e97b94 100644 --- a/test/intl402/Collator/prototype/compare/10.3.2_1_a_L15.js +++ b/test/intl402/Collator/prototype/compare/10.3.2_1_a_L15.js @@ -12,4 +12,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(new Intl.Collator().compare, true, false, [], 2); +testBuiltInObject(new Intl.Collator().compare, true, false, []); diff --git a/test/intl402/Collator/prototype/compare/10.3.2_L15.js b/test/intl402/Collator/prototype/compare/10.3.2_L15.js index f83d063d28c8a9624ddaeeaa688a332a1e6cf05a..5f11db40dc44f484c72bc6044e879c63d48ec649 100644 --- a/test/intl402/Collator/prototype/compare/10.3.2_L15.js +++ b/test/intl402/Collator/prototype/compare/10.3.2_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get , true, false, [], 0); +testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare").get , true, false, []); diff --git a/test/intl402/Collator/prototype/compare/compare-function-length.js b/test/intl402/Collator/prototype/compare/compare-function-length.js new file mode 100644 index 0000000000000000000000000000000000000000..2860bd2bc34ac2e70d74b8c6447d56ec4bf1ce54 --- /dev/null +++ b/test/intl402/Collator/prototype/compare/compare-function-length.js @@ -0,0 +1,28 @@ +// 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.compare +description: > + The length of the bound Collator compare function is 2. +info: | + get Intl.Collator.prototype.compare + + ... + 4. If collator.[[BoundCompare]] is undefined, then + a. Let F be a new built-in function object as defined in 10.3.4. + b. Let bc be BoundFunctionCreate(F, collator, « »). + c. Perform ! DefinePropertyOrThrow(bc, "length", PropertyDescriptor {[[Value]]: 2, + [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}). + ... + +includes: [propertyHelper.js] +---*/ + +var compareFn = new Intl.Collator().compare; + +assert.sameValue(compareFn.length, 2); + +verifyNotEnumerable(compareFn, "length"); +verifyNotWritable(compareFn, "length"); +verifyConfigurable(compareFn, "length"); diff --git a/test/intl402/Collator/prototype/compare/length.js b/test/intl402/Collator/prototype/compare/length.js new file mode 100644 index 0000000000000000000000000000000000000000..b17ba62ccdce7e7a01a3e0b9c37368cebd4b6aa4 --- /dev/null +++ b/test/intl402/Collator/prototype/compare/length.js @@ -0,0 +1,33 @@ +// 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.compare +description: > + get Intl.Collator.prototype.compare.length is 0. +info: | + get Intl.Collator.prototype.compare + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +var desc = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare"); + +assert.sameValue(desc.get.length, 0); + +verifyNotEnumerable(desc.get, "length"); +verifyNotWritable(desc.get, "length"); +verifyConfigurable(desc.get, "length"); diff --git a/test/intl402/Collator/prototype/resolvedOptions/10.3.3_L15.js b/test/intl402/Collator/prototype/resolvedOptions/10.3.3_L15.js index 59792f058c48c71f45324f267469847c18c08f7e..2c9238cde93c3a4d3d8d55b77d06dc268d98cb86 100644 --- a/test/intl402/Collator/prototype/resolvedOptions/10.3.3_L15.js +++ b/test/intl402/Collator/prototype/resolvedOptions/10.3.3_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.Collator.prototype.resolvedOptions, true, false, [], 0); +testBuiltInObject(Intl.Collator.prototype.resolvedOptions, true, false, []); diff --git a/test/intl402/Collator/prototype/resolvedOptions/length.js b/test/intl402/Collator/prototype/resolvedOptions/length.js new file mode 100644 index 0000000000000000000000000000000000000000..9307dc5041e7645c3cdd116cc9cff524b0f905cc --- /dev/null +++ b/test/intl402/Collator/prototype/resolvedOptions/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.Collator.prototype.resolvedOptions.length is 0. +info: | + Intl.Collator.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.Collator.prototype.resolvedOptions.length, 0); + +verifyNotEnumerable(Intl.Collator.prototype.resolvedOptions, "length"); +verifyNotWritable(Intl.Collator.prototype.resolvedOptions, "length"); +verifyConfigurable(Intl.Collator.prototype.resolvedOptions, "length"); diff --git a/test/intl402/Collator/supportedLocalesOf/10.2.2_L15.js b/test/intl402/Collator/supportedLocalesOf/10.2.2_L15.js index c5c41db3ae86ee7ce40a3d1044a3fe06fd6b41b1..870b90f56966d243d3a3cf0065f73ede02830162 100644 --- a/test/intl402/Collator/supportedLocalesOf/10.2.2_L15.js +++ b/test/intl402/Collator/supportedLocalesOf/10.2.2_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.Collator.supportedLocalesOf, true, false, [], 1); +testBuiltInObject(Intl.Collator.supportedLocalesOf, true, false, []); diff --git a/test/intl402/Collator/supportedLocalesOf/length.js b/test/intl402/Collator/supportedLocalesOf/length.js new file mode 100644 index 0000000000000000000000000000000000000000..b60708f25486b32bb5d631acd028979b521b38f6 --- /dev/null +++ b/test/intl402/Collator/supportedLocalesOf/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.Collator.supportedLocalesOf.length is 1. +info: | + Intl.Collator.supportedLocalesOf ( locales [ , options ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.Collator.supportedLocalesOf.length, 1); + +verifyNotEnumerable(Intl.Collator.supportedLocalesOf, "length"); +verifyNotWritable(Intl.Collator.supportedLocalesOf, "length"); +verifyConfigurable(Intl.Collator.supportedLocalesOf, "length"); diff --git a/test/intl402/Date/prototype/toLocaleDateString/13.3.2_L15.js b/test/intl402/Date/prototype/toLocaleDateString/13.3.2_L15.js index 277e109cfb0f5fd51d05726d35b450020703393a..37db01ec2533261aad8367d2c7559546003fe336 100644 --- a/test/intl402/Date/prototype/toLocaleDateString/13.3.2_L15.js +++ b/test/intl402/Date/prototype/toLocaleDateString/13.3.2_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Date.prototype.toLocaleDateString, true, false, [], 0); +testBuiltInObject(Date.prototype.toLocaleDateString, true, false, []); diff --git a/test/intl402/Date/prototype/toLocaleDateString/length.js b/test/intl402/Date/prototype/toLocaleDateString/length.js new file mode 100644 index 0000000000000000000000000000000000000000..cbb2136be9708985c9bd848cd04365904e116228 --- /dev/null +++ b/test/intl402/Date/prototype/toLocaleDateString/length.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sup-date.prototype.tolocaledatestring +description: > + Date.prototype.toLocaleDateString.length is 0. +info: | + Date.prototype.toLocaleDateString ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Date.prototype.toLocaleDateString.length, 0); + +verifyNotEnumerable(Date.prototype.toLocaleDateString, "length"); +verifyNotWritable(Date.prototype.toLocaleDateString, "length"); +verifyConfigurable(Date.prototype.toLocaleDateString, "length"); diff --git a/test/intl402/Date/prototype/toLocaleString/13.3.1_L15.js b/test/intl402/Date/prototype/toLocaleString/13.3.1_L15.js index bd49202ec7041311dde754d8c78947231f4f5f3c..7a874bd41f42457db2d7e49e93dacb3b16269a42 100644 --- a/test/intl402/Date/prototype/toLocaleString/13.3.1_L15.js +++ b/test/intl402/Date/prototype/toLocaleString/13.3.1_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Date.prototype.toLocaleString, true, false, [], 0); +testBuiltInObject(Date.prototype.toLocaleString, true, false, []); diff --git a/test/intl402/Date/prototype/toLocaleString/length.js b/test/intl402/Date/prototype/toLocaleString/length.js new file mode 100644 index 0000000000000000000000000000000000000000..0a1afc5ddb7cb392dfcda3adac0e271e75eede15 --- /dev/null +++ b/test/intl402/Date/prototype/toLocaleString/length.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sup-date.prototype.tolocalestring +description: > + Date.prototype.toLocaleString.length is 0. +info: | + Date.prototype.toLocaleString ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Date.prototype.toLocaleString.length, 0); + +verifyNotEnumerable(Date.prototype.toLocaleString, "length"); +verifyNotWritable(Date.prototype.toLocaleString, "length"); +verifyConfigurable(Date.prototype.toLocaleString, "length"); diff --git a/test/intl402/Date/prototype/toLocaleTimeString/13.3.3_L15.js b/test/intl402/Date/prototype/toLocaleTimeString/13.3.3_L15.js index e5a33ffe079e343965853f67f6037b6590083775..333547de7080255afd7eac7a089a081dc64a137b 100644 --- a/test/intl402/Date/prototype/toLocaleTimeString/13.3.3_L15.js +++ b/test/intl402/Date/prototype/toLocaleTimeString/13.3.3_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Date.prototype.toLocaleTimeString, true, false, [], 0); +testBuiltInObject(Date.prototype.toLocaleTimeString, true, false, []); diff --git a/test/intl402/Date/prototype/toLocaleTimeString/length.js b/test/intl402/Date/prototype/toLocaleTimeString/length.js new file mode 100644 index 0000000000000000000000000000000000000000..778033e69eb95186110ceb16e43ea903597f0340 --- /dev/null +++ b/test/intl402/Date/prototype/toLocaleTimeString/length.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sup-date.prototype.tolocaletimestring +description: > + Date.prototype.toLocaleTimeString.length is 0. +info: | + Date.prototype.toLocaleTimeString ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Date.prototype.toLocaleTimeString.length, 0); + +verifyNotEnumerable(Date.prototype.toLocaleTimeString, "length"); +verifyNotWritable(Date.prototype.toLocaleTimeString, "length"); +verifyConfigurable(Date.prototype.toLocaleTimeString, "length"); diff --git a/test/intl402/DateTimeFormat/12.1_L15.js b/test/intl402/DateTimeFormat/12.1_L15.js index 3ff0986b204eb53716d6c11076354973b381b818..d43864d8843ef954f0d042fd753b80a3ccd46de7 100644 --- a/test/intl402/DateTimeFormat/12.1_L15.js +++ b/test/intl402/DateTimeFormat/12.1_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.DateTimeFormat, true, true, ["supportedLocalesOf"], 0); +testBuiltInObject(Intl.DateTimeFormat, true, true, ["supportedLocalesOf"]); diff --git a/test/intl402/DateTimeFormat/length.js b/test/intl402/DateTimeFormat/length.js new file mode 100644 index 0000000000000000000000000000000000000000..7eb21739af15850deb829a71e587dea281402a09 --- /dev/null +++ b/test/intl402/DateTimeFormat/length.js @@ -0,0 +1,31 @@ +// 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 +description: > + Intl.DateTimeFormat.length is 0. +info: | + Intl.DateTimeFormat ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.DateTimeFormat.length, 0); + +verifyNotEnumerable(Intl.DateTimeFormat, "length"); +verifyNotWritable(Intl.DateTimeFormat, "length"); +verifyConfigurable(Intl.DateTimeFormat, "length"); diff --git a/test/intl402/DateTimeFormat/prototype/format/12.3.2_1_a_L15.js b/test/intl402/DateTimeFormat/prototype/format/12.3.2_1_a_L15.js index fbb850a9c8804fb90ad83f8d472ea5e606c0f88d..20750276652df8ddb63dec9cfa79a8d63ca0e741 100644 --- a/test/intl402/DateTimeFormat/prototype/format/12.3.2_1_a_L15.js +++ b/test/intl402/DateTimeFormat/prototype/format/12.3.2_1_a_L15.js @@ -12,4 +12,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(new Intl.DateTimeFormat().format, true, false, [], 1); +testBuiltInObject(new Intl.DateTimeFormat().format, true, false, []); diff --git a/test/intl402/DateTimeFormat/prototype/format/12.3.2_L15.js b/test/intl402/DateTimeFormat/prototype/format/12.3.2_L15.js index 18a216e61185d7c2274a1fa87bc2acfd6874f10f..2b11d565e09410f7536d2dfa7db1f07364281435 100644 --- a/test/intl402/DateTimeFormat/prototype/format/12.3.2_L15.js +++ b/test/intl402/DateTimeFormat/prototype/format/12.3.2_L15.js @@ -12,4 +12,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get , true, false, [], 0); +testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format").get , true, false, []); diff --git a/test/intl402/DateTimeFormat/prototype/format/format-function-length.js b/test/intl402/DateTimeFormat/prototype/format/format-function-length.js new file mode 100644 index 0000000000000000000000000000000000000000..e7af4121c66e651258468621fccb0f8b1f85d98e --- /dev/null +++ b/test/intl402/DateTimeFormat/prototype/format/format-function-length.js @@ -0,0 +1,28 @@ +// 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: > + The length of the bound DateTime Format function is 1. +info: | + get Intl.DateTimeFormat.prototype.format + + ... + 4. If dtf.[[BoundFormat]] is undefined, then + a. Let F be a new built-in function object as defined in DateTime Format Functions (12.1.5). + b. Let bf be BoundFunctionCreate(F, dft, « »). + c. Perform ! DefinePropertyOrThrow(bf, "length", PropertyDescriptor {[[Value]]: 1, + [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}). + ... + +includes: [propertyHelper.js] +---*/ + +var formatFn = new Intl.DateTimeFormat().format; + +assert.sameValue(formatFn.length, 1); + +verifyNotEnumerable(formatFn, "length"); +verifyNotWritable(formatFn, "length"); +verifyConfigurable(formatFn, "length"); diff --git a/test/intl402/DateTimeFormat/prototype/format/length.js b/test/intl402/DateTimeFormat/prototype/format/length.js new file mode 100644 index 0000000000000000000000000000000000000000..8c36d0d26a96a43e01c6d02968049dad6d01ca22 --- /dev/null +++ b/test/intl402/DateTimeFormat/prototype/format/length.js @@ -0,0 +1,33 @@ +// 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: > + get Intl.DateTimeFormat.prototype.format.length is 0. +info: | + get Intl.DateTimeFormat.prototype.format + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format"); + +assert.sameValue(desc.get.length, 0); + +verifyNotEnumerable(desc.get, "length"); +verifyNotWritable(desc.get, "length"); +verifyConfigurable(desc.get, "length"); diff --git a/test/intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3_L15.js b/test/intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3_L15.js index 9ba1f1e6bbecbb701f46cadc51c6d8ecd5a40627..e233686212cf959caa6437f24b13927c5f9d5b74 100644 --- a/test/intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3_L15.js +++ b/test/intl402/DateTimeFormat/prototype/resolvedOptions/12.3.3_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.DateTimeFormat.prototype.resolvedOptions, true, false, [], 0); +testBuiltInObject(Intl.DateTimeFormat.prototype.resolvedOptions, true, false, []); diff --git a/test/intl402/DateTimeFormat/prototype/resolvedOptions/length.js b/test/intl402/DateTimeFormat/prototype/resolvedOptions/length.js new file mode 100644 index 0000000000000000000000000000000000000000..2ee86de93b1496b7d0308fad2900588ac6bf0153 --- /dev/null +++ b/test/intl402/DateTimeFormat/prototype/resolvedOptions/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.DateTimeFormat.prototype.resolvedOptions.length is 0. +info: | + Intl.DateTimeFormat.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.DateTimeFormat.prototype.resolvedOptions.length, 0); + +verifyNotEnumerable(Intl.DateTimeFormat.prototype.resolvedOptions, "length"); +verifyNotWritable(Intl.DateTimeFormat.prototype.resolvedOptions, "length"); +verifyConfigurable(Intl.DateTimeFormat.prototype.resolvedOptions, "length"); diff --git a/test/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_L15.js b/test/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_L15.js index 1451ba70a0a9871784c0b130d9b872c85fbf421b..af65b4960f61d9b2e6d1d72a138d169baa1fee47 100644 --- a/test/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_L15.js +++ b/test/intl402/DateTimeFormat/supportedLocalesOf/12.2.2_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.DateTimeFormat.supportedLocalesOf, true, false, [], 1); +testBuiltInObject(Intl.DateTimeFormat.supportedLocalesOf, true, false, []); diff --git a/test/intl402/DateTimeFormat/supportedLocalesOf/length.js b/test/intl402/DateTimeFormat/supportedLocalesOf/length.js new file mode 100644 index 0000000000000000000000000000000000000000..0f29d6a0a9072940b70d642db6980b5dc5db9251 --- /dev/null +++ b/test/intl402/DateTimeFormat/supportedLocalesOf/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.DateTimeFormat.supportedLocalesOf.length is 1. +info: | + Intl.DateTimeFormat.supportedLocalesOf ( locales [ , options ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.DateTimeFormat.supportedLocalesOf.length, 1); + +verifyNotEnumerable(Intl.DateTimeFormat.supportedLocalesOf, "length"); +verifyNotWritable(Intl.DateTimeFormat.supportedLocalesOf, "length"); +verifyConfigurable(Intl.DateTimeFormat.supportedLocalesOf, "length"); diff --git a/test/intl402/Number/prototype/toLocaleString/13.2.1_L15.js b/test/intl402/Number/prototype/toLocaleString/13.2.1_L15.js index 5c20c41c45a44f193287b873fd9c2adb291b752f..80b61e535b7432613b3fc934076e43be86f4eeeb 100644 --- a/test/intl402/Number/prototype/toLocaleString/13.2.1_L15.js +++ b/test/intl402/Number/prototype/toLocaleString/13.2.1_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Number.prototype.toLocaleString, true, false, [], 0); +testBuiltInObject(Number.prototype.toLocaleString, true, false, []); diff --git a/test/intl402/Number/prototype/toLocaleString/length.js b/test/intl402/Number/prototype/toLocaleString/length.js new file mode 100644 index 0000000000000000000000000000000000000000..ff1538355ae2d698e85126af91759a3f4b75f090 --- /dev/null +++ b/test/intl402/Number/prototype/toLocaleString/length.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sup-number.prototype.tolocalestring +description: > + Number.prototype.toLocaleString.length is 0. +info: | + Number.prototype.toLocaleString ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Number.prototype.toLocaleString.length, 0); + +verifyNotEnumerable(Number.prototype.toLocaleString, "length"); +verifyNotWritable(Number.prototype.toLocaleString, "length"); +verifyConfigurable(Number.prototype.toLocaleString, "length"); diff --git a/test/intl402/NumberFormat/11.1_L15.js b/test/intl402/NumberFormat/11.1_L15.js index 4ac63e4edf572e3764ca6a6012c3a4a8d5bb2f0a..a9e8a0c6e289f53e05c598f5cefb34755a1f57ce 100644 --- a/test/intl402/NumberFormat/11.1_L15.js +++ b/test/intl402/NumberFormat/11.1_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.NumberFormat, true, true, ["supportedLocalesOf"], 0); +testBuiltInObject(Intl.NumberFormat, true, true, ["supportedLocalesOf"]); diff --git a/test/intl402/NumberFormat/length.js b/test/intl402/NumberFormat/length.js new file mode 100644 index 0000000000000000000000000000000000000000..e46a596ef124fa6fc72d666e2e0653a6615688ec --- /dev/null +++ b/test/intl402/NumberFormat/length.js @@ -0,0 +1,31 @@ +// 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 +description: > + Intl.NumberFormat.length is 0. +info: | + Intl.NumberFormat ( [ locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.NumberFormat.length, 0); + +verifyNotEnumerable(Intl.NumberFormat, "length"); +verifyNotWritable(Intl.NumberFormat, "length"); +verifyConfigurable(Intl.NumberFormat, "length"); diff --git a/test/intl402/NumberFormat/prototype/format/11.3.2_1_a_L15.js b/test/intl402/NumberFormat/prototype/format/11.3.2_1_a_L15.js index cdfcf105284265b422ffc686945cbc9f6ee380a9..2f4c34c4d6f7bb1c9c1e3a36000301abcf2a35c6 100644 --- a/test/intl402/NumberFormat/prototype/format/11.3.2_1_a_L15.js +++ b/test/intl402/NumberFormat/prototype/format/11.3.2_1_a_L15.js @@ -12,4 +12,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(new Intl.NumberFormat().format, true, false, [], 1); +testBuiltInObject(new Intl.NumberFormat().format, true, false, []); diff --git a/test/intl402/NumberFormat/prototype/format/11.3.2_L15.js b/test/intl402/NumberFormat/prototype/format/11.3.2_L15.js index 047046611b8f99beff157da3063ad3d22ddcbc27..0b42c9fa1f3085f1ee7fb2eb7dcd8ae2fb22816e 100644 --- a/test/intl402/NumberFormat/prototype/format/11.3.2_L15.js +++ b/test/intl402/NumberFormat/prototype/format/11.3.2_L15.js @@ -12,4 +12,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get , true, false, [], 0); +testBuiltInObject(Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format").get , true, false, []); diff --git a/test/intl402/NumberFormat/prototype/format/format-function-length.js b/test/intl402/NumberFormat/prototype/format/format-function-length.js new file mode 100644 index 0000000000000000000000000000000000000000..ed990780aee74547d5b06f22917d4e581d6c0dbd --- /dev/null +++ b/test/intl402/NumberFormat/prototype/format/format-function-length.js @@ -0,0 +1,28 @@ +// 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: > + The length of the bound Number Format function is 1. +info: | + get Intl.NumberFormat.prototype.format + + ... + 4. If nf.[[BoundFormat]] is undefined, then + a. Let F be a new built-in function object as defined in Number Format Functions (11.1.4). + b. Let bf be BoundFunctionCreate(F, nf, « »). + c. Perform ! DefinePropertyOrThrow(bf, "length", PropertyDescriptor {[[Value]]: 1, + [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}). + ... + +includes: [propertyHelper.js] +---*/ + +var formatFn = new Intl.NumberFormat().format; + +assert.sameValue(formatFn.length, 1); + +verifyNotEnumerable(formatFn, "length"); +verifyNotWritable(formatFn, "length"); +verifyConfigurable(formatFn, "length"); diff --git a/test/intl402/NumberFormat/prototype/format/length.js b/test/intl402/NumberFormat/prototype/format/length.js new file mode 100644 index 0000000000000000000000000000000000000000..79ed5098b789caa1b63360140df53e3ae3a1c290 --- /dev/null +++ b/test/intl402/NumberFormat/prototype/format/length.js @@ -0,0 +1,33 @@ +// 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: > + get Intl.NumberFormat.prototype.format.length is 0. +info: | + get Intl.NumberFormat.prototype.format + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +var desc = Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format"); + +assert.sameValue(desc.get.length, 0); + +verifyNotEnumerable(desc.get, "length"); +verifyNotWritable(desc.get, "length"); +verifyConfigurable(desc.get, "length"); diff --git a/test/intl402/NumberFormat/prototype/resolvedOptions/11.3.3_L15.js b/test/intl402/NumberFormat/prototype/resolvedOptions/11.3.3_L15.js index 9709ab848d131fa76dfe1808e8a797be5412e8d0..96448a6bf0d7249ffb769dbe3a5d3c69fd086115 100644 --- a/test/intl402/NumberFormat/prototype/resolvedOptions/11.3.3_L15.js +++ b/test/intl402/NumberFormat/prototype/resolvedOptions/11.3.3_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.NumberFormat.prototype.resolvedOptions, true, false, [], 0); +testBuiltInObject(Intl.NumberFormat.prototype.resolvedOptions, true, false, []); diff --git a/test/intl402/NumberFormat/prototype/resolvedOptions/length.js b/test/intl402/NumberFormat/prototype/resolvedOptions/length.js new file mode 100644 index 0000000000000000000000000000000000000000..0e59b8145e16924c809fcb24f42e5abe041abbdd --- /dev/null +++ b/test/intl402/NumberFormat/prototype/resolvedOptions/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.NumberFormat.prototype.resolvedOptions.length is 0. +info: | + Intl.NumberFormat.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.NumberFormat.prototype.resolvedOptions.length, 0); + +verifyNotEnumerable(Intl.NumberFormat.prototype.resolvedOptions, "length"); +verifyNotWritable(Intl.NumberFormat.prototype.resolvedOptions, "length"); +verifyConfigurable(Intl.NumberFormat.prototype.resolvedOptions, "length"); diff --git a/test/intl402/NumberFormat/supportedLocalesOf/11.2.2_L15.js b/test/intl402/NumberFormat/supportedLocalesOf/11.2.2_L15.js index e04db784195aa077179c1a5f0a50072f42e3a94a..f28c247bb04374f40974c31a213669d18acaea93 100644 --- a/test/intl402/NumberFormat/supportedLocalesOf/11.2.2_L15.js +++ b/test/intl402/NumberFormat/supportedLocalesOf/11.2.2_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.NumberFormat.supportedLocalesOf, true, false, [], 1); +testBuiltInObject(Intl.NumberFormat.supportedLocalesOf, true, false, []); diff --git a/test/intl402/NumberFormat/supportedLocalesOf/length.js b/test/intl402/NumberFormat/supportedLocalesOf/length.js new file mode 100644 index 0000000000000000000000000000000000000000..d4da368b0dfed5d4d1050392692565bb32c21c18 --- /dev/null +++ b/test/intl402/NumberFormat/supportedLocalesOf/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.NumberFormat.supportedLocalesOf.length is 1. +info: | + Intl.NumberFormat.supportedLocalesOf ( locales [ , options ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.NumberFormat.supportedLocalesOf.length, 1); + +verifyNotEnumerable(Intl.NumberFormat.supportedLocalesOf, "length"); +verifyNotWritable(Intl.NumberFormat.supportedLocalesOf, "length"); +verifyConfigurable(Intl.NumberFormat.supportedLocalesOf, "length"); diff --git a/test/intl402/PluralRules/builtin.js b/test/intl402/PluralRules/builtin.js index 8a887772d038a8fa172a3b0b586d3759373080c3..320ea42531b7175751ffb1ddf3febeb849d55fbf 100644 --- a/test/intl402/PluralRules/builtin.js +++ b/test/intl402/PluralRules/builtin.js @@ -11,4 +11,4 @@ author: Zibi Braniecki includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.PluralRules, true, true, ["supportedLocalesOf"], 0); +testBuiltInObject(Intl.PluralRules, true, true, ["supportedLocalesOf"]); diff --git a/test/intl402/PluralRules/prototype/resolvedOptions/builtins.js b/test/intl402/PluralRules/prototype/resolvedOptions/builtins.js index 4e192530f09716a77be661008721edd3c1b24921..6686d242576e503e81a4758370cc19f4f311838f 100644 --- a/test/intl402/PluralRules/prototype/resolvedOptions/builtins.js +++ b/test/intl402/PluralRules/prototype/resolvedOptions/builtins.js @@ -11,4 +11,4 @@ author: Zibi Braniecki includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.PluralRules.prototype.resolvedOptions, true, false, [], 0); +testBuiltInObject(Intl.PluralRules.prototype.resolvedOptions, true, false, []); diff --git a/test/intl402/PluralRules/prototype/resolvedOptions/length.js b/test/intl402/PluralRules/prototype/resolvedOptions/length.js new file mode 100644 index 0000000000000000000000000000000000000000..b67eb2586960c22a5d3ebc40f7796df1dad89a83 --- /dev/null +++ b/test/intl402/PluralRules/prototype/resolvedOptions/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.PluralRules.prototype.resolvedOptions.length is 0. +info: | + Intl.PluralRules.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.PluralRules.prototype.resolvedOptions.length, 0); + +verifyNotEnumerable(Intl.PluralRules.prototype.resolvedOptions, "length"); +verifyNotWritable(Intl.PluralRules.prototype.resolvedOptions, "length"); +verifyConfigurable(Intl.PluralRules.prototype.resolvedOptions, "length"); diff --git a/test/intl402/PluralRules/prototype/select/length.js b/test/intl402/PluralRules/prototype/select/length.js new file mode 100644 index 0000000000000000000000000000000000000000..004b701b90027ffbb83e5edfe94ca042c28594af --- /dev/null +++ b/test/intl402/PluralRules/prototype/select/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.PluralRules.prototype.select is 1. +info: | + Intl.PluralRules.prototype.select( value ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.PluralRules.prototype.select.length, 1); + +verifyNotEnumerable(Intl.PluralRules.prototype.select, "length"); +verifyNotWritable(Intl.PluralRules.prototype.select, "length"); +verifyConfigurable(Intl.PluralRules.prototype.select, "length"); diff --git a/test/intl402/PluralRules/supportedLocalesOf/length.js b/test/intl402/PluralRules/supportedLocalesOf/length.js new file mode 100644 index 0000000000000000000000000000000000000000..0ed98f32d34bf9a5f5a781a1b7c4c7125d772bb3 --- /dev/null +++ b/test/intl402/PluralRules/supportedLocalesOf/length.js @@ -0,0 +1,31 @@ +// 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: > + Intl.PluralRules.supportedLocalesOf.length is 1. +info: | + Intl.PluralRules.supportedLocalesOf ( locales [ , options ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.PluralRules.supportedLocalesOf.length, 1); + +verifyNotEnumerable(Intl.PluralRules.supportedLocalesOf, "length"); +verifyNotWritable(Intl.PluralRules.supportedLocalesOf, "length"); +verifyConfigurable(Intl.PluralRules.supportedLocalesOf, "length"); diff --git a/test/intl402/PluralRules/supportedLocalesOf/supportedLocalesOf.js b/test/intl402/PluralRules/supportedLocalesOf/supportedLocalesOf.js index 10c4ba2a9a7735b04742a82b5a97351e7ada0c90..af25e040673a7623edc36e79fbf4bee92618e61b 100644 --- a/test/intl402/PluralRules/supportedLocalesOf/supportedLocalesOf.js +++ b/test/intl402/PluralRules/supportedLocalesOf/supportedLocalesOf.js @@ -11,4 +11,4 @@ author: Zibi Braniecki includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(Intl.PluralRules.supportedLocalesOf, true, false, [], 1); +testBuiltInObject(Intl.PluralRules.supportedLocalesOf, true, false, []); diff --git a/test/intl402/String/prototype/localeCompare/13.1.1_L15.js b/test/intl402/String/prototype/localeCompare/13.1.1_L15.js index 552bfb34cd67c13a7523e2c71566fca430d943e7..a3564db9eb58fc84b34d6bc2e0c2477c536ab870 100644 --- a/test/intl402/String/prototype/localeCompare/13.1.1_L15.js +++ b/test/intl402/String/prototype/localeCompare/13.1.1_L15.js @@ -11,4 +11,4 @@ author: Norbert Lindenberg includes: [testBuiltInObject.js] ---*/ -testBuiltInObject(String.prototype.localeCompare, true, false, [], 1); +testBuiltInObject(String.prototype.localeCompare, true, false, []); diff --git a/test/intl402/String/prototype/localeCompare/length.js b/test/intl402/String/prototype/localeCompare/length.js new file mode 100644 index 0000000000000000000000000000000000000000..6ba106dd5609a413cbb300efdb1a39d06e7337d2 --- /dev/null +++ b/test/intl402/String/prototype/localeCompare/length.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sup-String.prototype.localeCompare +description: > + String.prototype.localeCompare.length is 1. +info: | + String.prototype.localeCompare ( that [ , locales [ , options ] ] ) + + 17 ECMAScript Standard Built-in Objects: + + Every built-in function object, including constructors, has a length + property whose value is an integer. Unless otherwise specified, this + value is equal to the largest number of named arguments shown in the + subclause headings for the function description. Optional parameters + (which are indicated with brackets: [ ]) or rest parameters (which + are shown using the form «...name») are not included in the default + argument count. + Unless otherwise specified, the length property of a built-in function + object has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: true }. + +includes: [propertyHelper.js] +---*/ + +assert.sameValue(String.prototype.localeCompare.length, 1); + +verifyNotEnumerable(String.prototype.localeCompare, "length"); +verifyNotWritable(String.prototype.localeCompare, "length"); +verifyConfigurable(String.prototype.localeCompare, "length");