From f08e98f86630ca9245d1b7bfaac2dfc6ee93a1c2 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 29 Jul 2024 21:02:03 +0200 Subject: [PATCH] Adds .length property descriptor tests for explicit resource management These are all the length.js tests from @rbuckton's PR #3866 to make reviewing easier. --- test/built-ins/AsyncDisposableStack/length.js | 32 +++++++++++++++++++ .../prototype/adopt/length.js | 32 +++++++++++++++++++ .../prototype/defer/length.js | 32 +++++++++++++++++++ .../prototype/disposeAsync/length.js | 32 +++++++++++++++++++ .../prototype/disposed/length.js | 23 +++++++++++++ .../prototype/move/length.js | 32 +++++++++++++++++++ .../prototype/use/length.js | 32 +++++++++++++++++++ .../Symbol.asyncDispose/length.js | 30 +++++++++++++++++ test/built-ins/DisposableStack/length.js | 32 +++++++++++++++++++ .../DisposableStack/prototype/adopt/length.js | 32 +++++++++++++++++++ .../DisposableStack/prototype/defer/length.js | 32 +++++++++++++++++++ .../prototype/dispose/length.js | 32 +++++++++++++++++++ .../prototype/disposed/length.js | 23 +++++++++++++ .../DisposableStack/prototype/move/length.js | 32 +++++++++++++++++++ .../DisposableStack/prototype/use/length.js | 32 +++++++++++++++++++ .../prototype/Symbol.dispose/length.js | 30 +++++++++++++++++ .../NativeErrors/SuppressedError/length.js | 32 +++++++++++++++++++ 17 files changed, 522 insertions(+) create mode 100644 test/built-ins/AsyncDisposableStack/length.js create mode 100644 test/built-ins/AsyncDisposableStack/prototype/adopt/length.js create mode 100644 test/built-ins/AsyncDisposableStack/prototype/defer/length.js create mode 100644 test/built-ins/AsyncDisposableStack/prototype/disposeAsync/length.js create mode 100644 test/built-ins/AsyncDisposableStack/prototype/disposed/length.js create mode 100644 test/built-ins/AsyncDisposableStack/prototype/move/length.js create mode 100644 test/built-ins/AsyncDisposableStack/prototype/use/length.js create mode 100644 test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/length.js create mode 100644 test/built-ins/DisposableStack/length.js create mode 100644 test/built-ins/DisposableStack/prototype/adopt/length.js create mode 100644 test/built-ins/DisposableStack/prototype/defer/length.js create mode 100644 test/built-ins/DisposableStack/prototype/dispose/length.js create mode 100644 test/built-ins/DisposableStack/prototype/disposed/length.js create mode 100644 test/built-ins/DisposableStack/prototype/move/length.js create mode 100644 test/built-ins/DisposableStack/prototype/use/length.js create mode 100644 test/built-ins/Iterator/prototype/Symbol.dispose/length.js create mode 100644 test/built-ins/NativeErrors/SuppressedError/length.js diff --git a/test/built-ins/AsyncDisposableStack/length.js b/test/built-ins/AsyncDisposableStack/length.js new file mode 100644 index 00000000000..f90ee3ea3d3 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + AsyncDisposableStack ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/adopt/length.js b/test/built-ins/AsyncDisposableStack/prototype/adopt/length.js new file mode 100644 index 00000000000..34a25af15a3 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/adopt/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + AsyncDisposableStack.prototype.adopt ( value, onDisposeAsync ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.adopt, 'length', { + value: 2, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/defer/length.js b/test/built-ins/AsyncDisposableStack/prototype/defer/length.js new file mode 100644 index 00000000000..96a62e3bc8b --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/defer/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + AsyncDisposableStack.prototype.defer ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.defer, 'length', { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/length.js b/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/length.js new file mode 100644 index 00000000000..2dc5102e263 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/disposeAsync/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + AsyncDisposableStack.prototype.disposeAsync ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.disposeAsync, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/disposed/length.js b/test/built-ins/AsyncDisposableStack/prototype/disposed/length.js new file mode 100644 index 00000000000..3f30906c3c1 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/disposed/length.js @@ -0,0 +1,23 @@ +// 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: > + Map.prototype.size.length value and descriptor. +info: | + get Map.prototype.size + + 17 ECMAScript Standard Built-in Objects +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Map.prototype, 'size'); + +assert.sameValue( + descriptor.get.length, 0, + 'The value of `Map.prototype.size.length` is `0`' +); + +verifyNotEnumerable(descriptor.get, 'length'); +verifyNotWritable(descriptor.get, 'length'); +verifyConfigurable(descriptor.get, 'length'); diff --git a/test/built-ins/AsyncDisposableStack/prototype/move/length.js b/test/built-ins/AsyncDisposableStack/prototype/move/length.js new file mode 100644 index 00000000000..f6919ea1f30 --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/move/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + AsyncDisposableStack.prototype.move ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.move, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncDisposableStack/prototype/use/length.js b/test/built-ins/AsyncDisposableStack/prototype/use/length.js new file mode 100644 index 00000000000..5634b9d349c --- /dev/null +++ b/test/built-ins/AsyncDisposableStack/prototype/use/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + AsyncDisposableStack.prototype.use ( 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(AsyncDisposableStack.prototype.use, 'length', { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/length.js b/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/length.js new file mode 100644 index 00000000000..a9c34d30ed2 --- /dev/null +++ b/test/built-ins/AsyncIteratorPrototype/Symbol.asyncDispose/length.js @@ -0,0 +1,30 @@ +// 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: Length of %AsyncIteratorPrototype%[ @@asyncDispose ] +info: | + ES6 Section 17: + 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, including optional parameters. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object 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], 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/DisposableStack/length.js b/test/built-ins/DisposableStack/length.js new file mode 100644 index 00000000000..7d0def4fb1c --- /dev/null +++ b/test/built-ins/DisposableStack/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + DisposableStack ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/adopt/length.js b/test/built-ins/DisposableStack/prototype/adopt/length.js new file mode 100644 index 00000000000..f2dd3c63ec4 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/adopt/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + DisposableStack.prototype.adopt ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.adopt, 'length', { + value: 2, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/defer/length.js b/test/built-ins/DisposableStack/prototype/defer/length.js new file mode 100644 index 00000000000..6b3e90e774b --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/defer/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + DisposableStack.prototype.defer ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.defer, 'length', { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/dispose/length.js b/test/built-ins/DisposableStack/prototype/dispose/length.js new file mode 100644 index 00000000000..326223f36f6 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/dispose/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + DisposableStack.prototype.dispose ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.dispose, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/disposed/length.js b/test/built-ins/DisposableStack/prototype/disposed/length.js new file mode 100644 index 00000000000..3e1d77f3df1 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/disposed/length.js @@ -0,0 +1,23 @@ +// 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: > + Map.prototype.size.length value and descriptor. +info: | + get Map.prototype.size + + 17 ECMAScript Standard Built-in Objects +includes: [propertyHelper.js] +---*/ + +var descriptor = Object.getOwnPropertyDescriptor(Map.prototype, 'size'); + +assert.sameValue( + descriptor.get.length, 0, + 'The value of `Map.prototype.size.length` is `0`' +); + +verifyNotEnumerable(descriptor.get, 'length'); +verifyNotWritable(descriptor.get, 'length'); +verifyConfigurable(descriptor.get, 'length'); diff --git a/test/built-ins/DisposableStack/prototype/move/length.js b/test/built-ins/DisposableStack/prototype/move/length.js new file mode 100644 index 00000000000..7091a70b6e1 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/move/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + DisposableStack.prototype.move ( ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.move, 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/DisposableStack/prototype/use/length.js b/test/built-ins/DisposableStack/prototype/use/length.js new file mode 100644 index 00000000000..969531f7433 --- /dev/null +++ b/test/built-ins/DisposableStack/prototype/use/length.js @@ -0,0 +1,32 @@ +// 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.length property descriptor +info: | + DisposableStack.prototype.use ( 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(DisposableStack.prototype.use, 'length', { + value: 1, + writable: false, + enumerable: false, + configurable: true +}); diff --git a/test/built-ins/Iterator/prototype/Symbol.dispose/length.js b/test/built-ins/Iterator/prototype/Symbol.dispose/length.js new file mode 100644 index 00000000000..4a31d3b38e3 --- /dev/null +++ b/test/built-ins/Iterator/prototype/Symbol.dispose/length.js @@ -0,0 +1,30 @@ +// 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: Length of %IteratorPrototype%[ @@dispose ] +info: | + ES6 Section 17: + 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, including optional parameters. + + [...] + + Unless otherwise specified, the length property of a built-in Function + object 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], 'length', { + value: 0, + writable: false, + enumerable: false, + configurable: true, +}); diff --git a/test/built-ins/NativeErrors/SuppressedError/length.js b/test/built-ins/NativeErrors/SuppressedError/length.js new file mode 100644 index 00000000000..6e8fc344be9 --- /dev/null +++ b/test/built-ins/NativeErrors/SuppressedError/length.js @@ -0,0 +1,32 @@ +// 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-constructors +description: SuppressedError.length property descriptor +info: | + SuppressedError ( error, suppressed, message ) + + 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] +features: [explicit-resource-management] +---*/ + +verifyProperty(SuppressedError, 'length', { + value: 3, + writable: false, + enumerable: false, + configurable: true +});