diff --git a/test/built-ins/AsyncDisposableStack/name.js b/test/built-ins/AsyncDisposableStack/name.js new file mode 100644 index 0000000000..521b3b1f5f --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-asyncdisposablestack +description: AsyncDisposableStack.name property descriptor +info: | + AsyncDisposableStack ( ) + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack, 'name', { + value: 'AsyncDisposableStack', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/adopt/name.js b/test/built-ins/AsyncDisposableStack/prototype/adopt/name.js new file mode 100644 index 0000000000..4d1be41006 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/adopt/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-asyncdisposablestack.prototype.adopt +description: AsyncDisposableStack.prototype.adopt.name property descriptor +info: | + AsyncDisposableStack.prototype.adopt.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.adopt, 'name', { + value: 'adopt', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/defer/name.js b/test/built-ins/AsyncDisposableStack/prototype/defer/name.js new file mode 100644 index 0000000000..a060306579 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/defer/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-asyncdisposablestack.prototype.defer +description: AsyncDisposableStack.prototype.defer.name property descriptor +info: | + AsyncDisposableStack.prototype.defer.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.defer, 'name', { + value: 'defer', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/name.js b/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/name.js new file mode 100644 index 0000000000..87351ecdf3 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-asyncdisposablestack.prototype.disposeAsync +description: AsyncDisposableStack.prototype.disposeAsync.name property descriptor +info: | + AsyncDisposableStack.prototype.disposeAsync.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.disposeAsync, 'name', { + value: 'disposeAsync', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/disposed/name.js b/test/built-ins/AsyncDisposableStack/prototype/disposed/name.js new file mode 100644 index 0000000000..71866de702 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/disposed/name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-get-asyncdisposablestack.prototype.disposed +description: > + AsyncDisposableStack.prototype.disposed.name value and descriptor. +info: | + get AsyncDisposableStack.prototype.size + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(AsyncDisposableStack.prototype, 'disposed'); + +assert.sameValue(descriptor.get.name, + 'get disposed', + 'The value of `descriptor.get.name` is `get disposed`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/AsyncDisposableStack/prototype/move/name.js b/test/built-ins/AsyncDisposableStack/prototype/move/name.js new file mode 100644 index 0000000000..4b0759da4e --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/move/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-asyncdisposablestack.prototype.move +description: AsyncDisposableStack.prototype.move.name property descriptor +info: | + AsyncDisposableStack.prototype.move.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.move, 'name', { + value: 'move', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/use/name.js b/test/built-ins/AsyncDisposableStack/prototype/use/name.js new file mode 100644 index 0000000000..ff27a8cde0 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/use/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-asyncdisposablestack.prototype.use +description: AsyncDisposableStack.prototype.use.name property descriptor +info: | + AsyncDisposableStack.prototype.use.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.use, 'name', { + value: 'use', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/name.js b/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/name.js new file mode 100644 index 0000000000..5ea13ac63f --- /dev/null +++ b/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/name.js @@ -0,0 +1,33 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-%asynciteratorprototype%-@@asyncDispose +description: Descriptor for `name` property +info: | + The value of the name property of this function is "[Symbol.asyncDispose]". + + ES6 Section 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, this value is the name that is given to + the function in this specification. + + [...] + + Unless otherwise specified, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +features: [explicit-resource-management] +includes: [propertyHelper.js] +---*/ + +async function* generator() {} +const AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(generator.prototype)) + +verifyProperty(AsyncIteratorPrototype[Symbol.asyncDispose], 'name', { + value: '[Symbol.asyncDispose]', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/DisposableStack/name.js b/test/built-ins/DisposableStack/name.js new file mode 100644 index 0000000000..075b2d51ee --- /dev/null +++ b/test/built-ins/DisposableStack/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-disposablestack +description: DisposableStack.name property descriptor +info: | + DisposableStack ( ) + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack, 'name', { + value: 'DisposableStack', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/adopt/name.js b/test/built-ins/DisposableStack/prototype/adopt/name.js new file mode 100644 index 0000000000..e81a624860 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/adopt/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-disposablestack.prototype.adopt +description: DisposableStack.prototype.adopt.name property descriptor +info: | + DisposableStack.prototype.adopt.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.adopt, 'name', { + value: 'adopt', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/defer/name.js b/test/built-ins/DisposableStack/prototype/defer/name.js new file mode 100644 index 0000000000..808c66793d --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/defer/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-disposablestack.prototype.defer +description: DisposableStack.prototype.defer.name property descriptor +info: | + DisposableStack.prototype.defer.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.defer, 'name', { + value: 'defer', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/dispose/name.js b/test/built-ins/DisposableStack/prototype/dispose/name.js new file mode 100644 index 0000000000..cac48a362b --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/dispose/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-disposablestack.prototype.dispose +description: DisposableStack.prototype.dispose.name property descriptor +info: | + DisposableStack.prototype.dispose.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.dispose, 'name', { + value: 'dispose', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/disposed/name.js b/test/built-ins/DisposableStack/prototype/disposed/name.js new file mode 100644 index 0000000000..c20b505705 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/disposed/name.js @@ -0,0 +1,28 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-get-disposablestack.prototype.disposed +description: > + DisposableStack.prototype.disposed.name value and descriptor. +info: | + get DisposableStack.prototype.size + + 17 ECMAScript Standard Built-in Objects + + Functions that are specified as get or set accessor functions of built-in + properties have "get " or "set " prepended to the property name string. + +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(DisposableStack.prototype, 'disposed'); + +assert.sameValue(descriptor.get.name, + 'get disposed', + 'The value of `descriptor.get.name` is `get disposed`' +); + +verifyNotEnumerable(descriptor.get, 'name'); +verifyNotWritable(descriptor.get, 'name'); +verifyConfigurable(descriptor.get, 'name'); diff --git a/test/built-ins/DisposableStack/prototype/move/name.js b/test/built-ins/DisposableStack/prototype/move/name.js new file mode 100644 index 0000000000..a3b9844e04 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/move/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-disposablestack.prototype.move +description: DisposableStack.prototype.move.name property descriptor +info: | + DisposableStack.prototype.move.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.move, 'name', { + value: 'move', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/use/name.js b/test/built-ins/DisposableStack/prototype/use/name.js new file mode 100644 index 0000000000..d2b8327197 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/use/name.js @@ -0,0 +1,31 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-disposablestack.prototype.use +description: DisposableStack.prototype.use.name property descriptor +info: | + DisposableStack.prototype.use.name value and property descriptor + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.use, 'name', { + value: 'use', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/Iterator/prototype/Symbol.dispose/name.js b/test/built-ins/Iterator/prototype/Symbol.dispose/name.js new file mode 100644 index 0000000000..a6d17ef8ee --- /dev/null +++ b/test/built-ins/Iterator/prototype/Symbol.dispose/name.js @@ -0,0 +1,33 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-%iteratorprototype%-@@dispose +description: Descriptor for `name` property +info: | + The value of the name property of this function is "[Symbol.dispose]". + + ES6 Section 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, this value is the name that is given to + the function in this specification. + + [...] + + Unless otherwise specified, the name property of a built-in Function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +features: [explicit-resource-management] +includes: [propertyHelper.js] +---*/ +const IteratorPrototype = Object.getPrototypeOf( + Object.getPrototypeOf([][Symbol.iterator]()) +); + +verifyProperty(IteratorPrototype[Symbol.dispose], 'name', { + value: '[Symbol.dispose]', + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/NativeErrors/SuppressedError/name.js b/test/built-ins/NativeErrors/SuppressedError/name.js new file mode 100644 index 0000000000..7af84ad00a --- /dev/null +++ b/test/built-ins/NativeErrors/SuppressedError/name.js @@ -0,0 +1,33 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-properties-of-the-suppressederror-constructor +description: SuppressedError.name property descriptor +info: | + Properties of the SuppressedError Constructor + + - has a name property whose value is the String value "SuppressedError". + + 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, this value is the name that + is given to the function in this specification. For functions that + are specified as properties of objects, the name value is the + property name string used to access the function. [...] + + Unless otherwise specified, the name property of a built-in function + object, if it exists, has the attributes { [[Writable]]: false, + [[Enumerable]]: false, [[Configurable]]: true }. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(SuppressedError, 'name', { + value: 'SuppressedError', + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/NativeErrors/SuppressedError/prototype/name.js b/test/built-ins/NativeErrors/SuppressedError/prototype/name.js new file mode 100644 index 0000000000..ec90505f2a --- /dev/null +++ b/test/built-ins/NativeErrors/SuppressedError/prototype/name.js @@ -0,0 +1,24 @@ +// Copyright (C) 2023 Ron Buckton. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-aggregate-error.prototype.name +description: > + The `SuppressedError.prototype.name` property descriptor. +info: | + The initial value of SuppressedError.prototype.name is "SuppressedError". + + 17 ECMAScript Standard Built-in Objects: + + Every other data property described (...) has the attributes { [[Writable]]: true, + [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified. +includes: [propertyHelper.js] +features: [explicit-resource-management] +---*/ + +verifyProperty(SuppressedError.prototype, 'name', { + value: 'SuppressedError', + enumerable: false, + writable: true, + configurable: true +});