diff --git a/test/intl402/Collator/name.js b/test/intl402/Collator/name.js new file mode 100755 index 0000000000..c1b94b2abe --- /dev/null +++ b/test/intl402/Collator/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.Collator +description: > + Intl.Collator.name is "Collator". +info: > + 10.1.2 Intl.Collator ([ locales [ , options ]]) + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.Collator.name, "Collator"); + +verifyNotEnumerable(Intl.Collator, "name"); +verifyNotWritable(Intl.Collator, "name"); +verifyConfigurable(Intl.Collator, "name"); diff --git a/test/intl402/Collator/prototype/compare/compare-function-name.js b/test/intl402/Collator/prototype/compare/compare-function-name.js new file mode 100755 index 0000000000..53f334fd86 --- /dev/null +++ b/test/intl402/Collator/prototype/compare/compare-function-name.js @@ -0,0 +1,22 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.Collator.prototype.compare +description: > + The bound Collator compare function is an anonymous function. +info: > + 10.3.3 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}). + d. Set collator.[[boundCompare]] to bc. + ... +---*/ + +var compareFn = new Intl.Collator().compare; + +assert.sameValue(Object.prototype.hasOwnProperty.call(compareFn, "name"), false); diff --git a/test/intl402/Collator/prototype/compare/name.js b/test/intl402/Collator/prototype/compare/name.js new file mode 100755 index 0000000000..7b161a87a0 --- /dev/null +++ b/test/intl402/Collator/prototype/compare/name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.Collator.prototype.compare +description: > + get Intl.Collator.prototype.compare.name is "get compare". +info: > + 10.3.3 get Intl.Collator.prototype.compare + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var desc = Object.getOwnPropertyDescriptor(Intl.Collator.prototype, "compare"); + +assert.sameValue(desc.get.name, "get compare"); + +verifyNotEnumerable(desc.get, "name"); +verifyNotWritable(desc.get, "name"); +verifyConfigurable(desc.get, "name"); diff --git a/test/intl402/Collator/prototype/resolvedOptions/name.js b/test/intl402/Collator/prototype/resolvedOptions/name.js new file mode 100755 index 0000000000..9736e5135a --- /dev/null +++ b/test/intl402/Collator/prototype/resolvedOptions/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.Collator.prototype.resolvedOptions +description: > + Intl.Collator.prototype.resolvedOptions.name is "resolvedOptions". +info: > + 10.3.5 Intl.Collator.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.Collator.prototype.resolvedOptions.name, "resolvedOptions"); + +verifyNotEnumerable(Intl.Collator.prototype.resolvedOptions, "name"); +verifyNotWritable(Intl.Collator.prototype.resolvedOptions, "name"); +verifyConfigurable(Intl.Collator.prototype.resolvedOptions, "name"); diff --git a/test/intl402/Collator/supportedLocalesOf/name.js b/test/intl402/Collator/supportedLocalesOf/name.js new file mode 100755 index 0000000000..b5695c7767 --- /dev/null +++ b/test/intl402/Collator/supportedLocalesOf/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.Collator.supportedLocalesOf +description: > + Intl.Collator.supportedLocalesOf.name is "supportedLocalesOf". +info: > + 10.2.2 Intl.Collator.supportedLocalesOf (locales [ , options ]) + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.Collator.supportedLocalesOf.name, "supportedLocalesOf"); + +verifyNotEnumerable(Intl.Collator.supportedLocalesOf, "name"); +verifyNotWritable(Intl.Collator.supportedLocalesOf, "name"); +verifyConfigurable(Intl.Collator.supportedLocalesOf, "name"); diff --git a/test/intl402/DateTimeFormat/name.js b/test/intl402/DateTimeFormat/name.js new file mode 100755 index 0000000000..621cc4297d --- /dev/null +++ b/test/intl402/DateTimeFormat/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.DateTimeFormat +description: > + Intl.DateTimeFormat.name is "DateTimeFormat". +info: > + 12.2.1 Intl.DateTimeFormat ([ locales [ , options ]]) + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.DateTimeFormat.name, "DateTimeFormat"); + +verifyNotEnumerable(Intl.DateTimeFormat, "name"); +verifyNotWritable(Intl.DateTimeFormat, "name"); +verifyConfigurable(Intl.DateTimeFormat, "name"); diff --git a/test/intl402/DateTimeFormat/prototype/format/format-function-name.js b/test/intl402/DateTimeFormat/prototype/format/format-function-name.js new file mode 100755 index 0000000000..d07cec8c03 --- /dev/null +++ b/test/intl402/DateTimeFormat/prototype/format/format-function-name.js @@ -0,0 +1,22 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.DateTimeFormat.prototype.format +description: > + The bound DateTimeFormat format function is an anonymous function. +info: > + 12.4.3 get Intl.DateTimeFormat.prototype.compare + + ... + 4. If the [[boundFormat]] internal slot of dtf 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}). + d. Set dtf.[[boundFormat]] to bf. + ... +---*/ + +var formatFn = new Intl.DateTimeFormat().format; + +assert.sameValue(Object.prototype.hasOwnProperty.call(formatFn, "name"), false); diff --git a/test/intl402/DateTimeFormat/prototype/format/name.js b/test/intl402/DateTimeFormat/prototype/format/name.js new file mode 100755 index 0000000000..76a8979b2e --- /dev/null +++ b/test/intl402/DateTimeFormat/prototype/format/name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.DateTimeFormat.prototype.format +description: > + get Intl.DateTimeFormat.prototype.format.name is "get format". +info: > + 12.4.3 get Intl.DateTimeFormat.prototype.format + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var desc = Object.getOwnPropertyDescriptor(Intl.DateTimeFormat.prototype, "format"); + +assert.sameValue(desc.get.name, "get format"); + +verifyNotEnumerable(desc.get, "name"); +verifyNotWritable(desc.get, "name"); +verifyConfigurable(desc.get, "name"); diff --git a/test/intl402/DateTimeFormat/prototype/resolvedOptions/name.js b/test/intl402/DateTimeFormat/prototype/resolvedOptions/name.js new file mode 100755 index 0000000000..17898da9ac --- /dev/null +++ b/test/intl402/DateTimeFormat/prototype/resolvedOptions/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.DateTimeFormat.prototype.resolvedOptions +description: > + Intl.DateTimeFormat.prototype.resolvedOptions.name is "resolvedOptions". +info: > + 12.4.4 Intl.DateTimeFormat.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.DateTimeFormat.prototype.resolvedOptions.name, "resolvedOptions"); + +verifyNotEnumerable(Intl.DateTimeFormat.prototype.resolvedOptions, "name"); +verifyNotWritable(Intl.DateTimeFormat.prototype.resolvedOptions, "name"); +verifyConfigurable(Intl.DateTimeFormat.prototype.resolvedOptions, "name"); diff --git a/test/intl402/DateTimeFormat/supportedLocalesOf/name.js b/test/intl402/DateTimeFormat/supportedLocalesOf/name.js new file mode 100755 index 0000000000..865d16b6b7 --- /dev/null +++ b/test/intl402/DateTimeFormat/supportedLocalesOf/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.DateTimeFormat.supportedLocalesOf +description: > + Intl.DateTimeFormat.supportedLocalesOf.name is "supportedLocalesOf". +info: > + 12.3.2 Intl.DateTimeFormat.supportedLocalesOf (locales [ , options ]) + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.DateTimeFormat.supportedLocalesOf.name, "supportedLocalesOf"); + +verifyNotEnumerable(Intl.DateTimeFormat.supportedLocalesOf, "name"); +verifyNotWritable(Intl.DateTimeFormat.supportedLocalesOf, "name"); +verifyConfigurable(Intl.DateTimeFormat.supportedLocalesOf, "name"); diff --git a/test/intl402/NumberFormat/name.js b/test/intl402/NumberFormat/name.js new file mode 100755 index 0000000000..3106dda170 --- /dev/null +++ b/test/intl402/NumberFormat/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.NumberFormat +description: > + Intl.NumberFormat.name is "NumberFormat". +info: > + 11.2.1 Intl.NumberFormat ([ locales [ , options ]]) + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.NumberFormat.name, "NumberFormat"); + +verifyNotEnumerable(Intl.NumberFormat, "name"); +verifyNotWritable(Intl.NumberFormat, "name"); +verifyConfigurable(Intl.NumberFormat, "name"); diff --git a/test/intl402/NumberFormat/prototype/format/format-function-name.js b/test/intl402/NumberFormat/prototype/format/format-function-name.js new file mode 100755 index 0000000000..babad92798 --- /dev/null +++ b/test/intl402/NumberFormat/prototype/format/format-function-name.js @@ -0,0 +1,22 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.NumberFormat.prototype.format +description: > + The bound NumberFormat format function is an anonymous function. +info: > + 11.4.3 get Intl.NumberFormat.prototype.compare + + ... + 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.3). + b. Let bf be BoundFunctionCreate(F, nf, « »). + c. Perform ! DefinePropertyOrThrow(bf, "length", PropertyDescriptor {[[Value]]: 1, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true}). + d. Set nf.[[boundFormat]] to bf. + ... +---*/ + +var formatFn = new Intl.NumberFormat().format; + +assert.sameValue(Object.prototype.hasOwnProperty.call(formatFn, "name"), false); diff --git a/test/intl402/NumberFormat/prototype/format/name.js b/test/intl402/NumberFormat/prototype/format/name.js new file mode 100755 index 0000000000..0d77eb2a87 --- /dev/null +++ b/test/intl402/NumberFormat/prototype/format/name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.NumberFormat.prototype.format +description: > + get Intl.NumberFormat.prototype.format.name is "get format". +info: > + 11.4.3 get Intl.NumberFormat.prototype.format + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +var desc = Object.getOwnPropertyDescriptor(Intl.NumberFormat.prototype, "format"); + +assert.sameValue(desc.get.name, "get format"); + +verifyNotEnumerable(desc.get, "name"); +verifyNotWritable(desc.get, "name"); +verifyConfigurable(desc.get, "name"); diff --git a/test/intl402/NumberFormat/prototype/resolvedOptions/name.js b/test/intl402/NumberFormat/prototype/resolvedOptions/name.js new file mode 100755 index 0000000000..c078448d49 --- /dev/null +++ b/test/intl402/NumberFormat/prototype/resolvedOptions/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.NumberFormat.prototype.resolvedOptions +description: > + Intl.NumberFormat.prototype.resolvedOptions.name is "resolvedOptions". +info: > + 11.4.4 Intl.NumberFormat.prototype.resolvedOptions () + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.NumberFormat.prototype.resolvedOptions.name, "resolvedOptions"); + +verifyNotEnumerable(Intl.NumberFormat.prototype.resolvedOptions, "name"); +verifyNotWritable(Intl.NumberFormat.prototype.resolvedOptions, "name"); +verifyConfigurable(Intl.NumberFormat.prototype.resolvedOptions, "name"); diff --git a/test/intl402/NumberFormat/supportedLocalesOf/name.js b/test/intl402/NumberFormat/supportedLocalesOf/name.js new file mode 100755 index 0000000000..f3cdd82efb --- /dev/null +++ b/test/intl402/NumberFormat/supportedLocalesOf/name.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 André Bargull. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +id: sec-Intl.NumberFormat.supportedLocalesOf +description: > + Intl.NumberFormat.supportedLocalesOf.name is "supportedLocalesOf". +info: > + 11.3.2 Intl.NumberFormat.supportedLocalesOf (locales [ , options ]) + + 17 ECMAScript Standard Built-in Objects: + 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, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Intl.NumberFormat.supportedLocalesOf.name, "supportedLocalesOf"); + +verifyNotEnumerable(Intl.NumberFormat.supportedLocalesOf, "name"); +verifyNotWritable(Intl.NumberFormat.supportedLocalesOf, "name"); +verifyConfigurable(Intl.NumberFormat.supportedLocalesOf, "name");