From 238f4caa9a21a5d5a84fe349e40c6ef892f86617 Mon Sep 17 00:00:00 2001 From: Leonardo Balter Date: Thu, 2 Mar 2017 18:17:19 -0500 Subject: [PATCH] Update length descriptor tests for Math properties --- test/built-ins/Math/acosh/acosh-length.js | 10 ------- test/built-ins/Math/acosh/length.js | 25 ++++++++++++++++ test/built-ins/Math/asinh/asinh-length.js | 10 ------- test/built-ins/Math/asinh/length.js | 28 ++++++++++++++++++ test/built-ins/Math/atanh/atanh-length.js | 10 ------- test/built-ins/Math/atanh/length.js | 28 ++++++++++++++++++ test/built-ins/Math/cbrt/cbrt-length.js | 10 ------- test/built-ins/Math/cbrt/length.js | 28 ++++++++++++++++++ test/built-ins/Math/cosh/cosh-length.js | 10 ------- test/built-ins/Math/cosh/length.js | 25 ++++++++++++++++ test/built-ins/Math/expm1/expm1-length.js | 10 ------- test/built-ins/Math/expm1/length.js | 28 ++++++++++++++++++ .../Math/hypot/Math.hypot_lengthProp.js | 10 ------- test/built-ins/Math/hypot/length.js | 29 +++++++++++++++++++ test/built-ins/Math/imul/imul-length.js | 10 ------- test/built-ins/Math/imul/length.js | 28 ++++++++++++++++++ test/built-ins/Math/log10/Log10-length.js | 10 ------- test/built-ins/Math/log10/length.js | 28 ++++++++++++++++++ test/built-ins/Math/log1p/Log1p-length.js | 10 ------- test/built-ins/Math/log1p/length.js | 28 ++++++++++++++++++ test/built-ins/Math/log2/length.js | 28 ++++++++++++++++++ test/built-ins/Math/log2/log2-length.js | 10 ------- test/built-ins/Math/max/length.js | 26 +++++++++++++++++ test/built-ins/Math/min/length.js | 26 +++++++++++++++++ test/built-ins/Math/sign/length.js | 25 ++++++++++++++++ test/built-ins/Math/sign/sign-length.js | 10 ------- test/built-ins/Math/sinh/length.js | 25 ++++++++++++++++ test/built-ins/Math/sinh/sinh-length.js | 10 ------- test/built-ins/Math/tanh/length.js | 25 ++++++++++++++++ test/built-ins/Math/tanh/tanh-length.js | 10 ------- test/built-ins/Math/trunc/length.js | 25 ++++++++++++++++ test/built-ins/Math/trunc/trunc-length.js | 10 ------- 32 files changed, 455 insertions(+), 150 deletions(-) delete mode 100644 test/built-ins/Math/acosh/acosh-length.js create mode 100644 test/built-ins/Math/acosh/length.js delete mode 100644 test/built-ins/Math/asinh/asinh-length.js create mode 100644 test/built-ins/Math/asinh/length.js delete mode 100644 test/built-ins/Math/atanh/atanh-length.js create mode 100644 test/built-ins/Math/atanh/length.js delete mode 100644 test/built-ins/Math/cbrt/cbrt-length.js create mode 100644 test/built-ins/Math/cbrt/length.js delete mode 100644 test/built-ins/Math/cosh/cosh-length.js create mode 100644 test/built-ins/Math/cosh/length.js delete mode 100644 test/built-ins/Math/expm1/expm1-length.js create mode 100644 test/built-ins/Math/expm1/length.js delete mode 100644 test/built-ins/Math/hypot/Math.hypot_lengthProp.js create mode 100644 test/built-ins/Math/hypot/length.js delete mode 100644 test/built-ins/Math/imul/imul-length.js create mode 100644 test/built-ins/Math/imul/length.js delete mode 100644 test/built-ins/Math/log10/Log10-length.js create mode 100644 test/built-ins/Math/log10/length.js delete mode 100644 test/built-ins/Math/log1p/Log1p-length.js create mode 100644 test/built-ins/Math/log1p/length.js create mode 100644 test/built-ins/Math/log2/length.js delete mode 100644 test/built-ins/Math/log2/log2-length.js create mode 100644 test/built-ins/Math/max/length.js create mode 100644 test/built-ins/Math/min/length.js create mode 100644 test/built-ins/Math/sign/length.js delete mode 100644 test/built-ins/Math/sign/sign-length.js create mode 100644 test/built-ins/Math/sinh/length.js delete mode 100644 test/built-ins/Math/sinh/sinh-length.js create mode 100644 test/built-ins/Math/tanh/length.js delete mode 100644 test/built-ins/Math/tanh/tanh-length.js create mode 100644 test/built-ins/Math/trunc/length.js delete mode 100644 test/built-ins/Math/trunc/trunc-length.js diff --git a/test/built-ins/Math/acosh/acosh-length.js b/test/built-ins/Math/acosh/acosh-length.js deleted file mode 100644 index 80cfb9dc4c..0000000000 --- a/test/built-ins/Math/acosh/acosh-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.acosh -es6id: 20.2.2.3 ----*/ - -assert.sameValue(Math.acosh.length, 1); - diff --git a/test/built-ins/Math/acosh/length.js b/test/built-ins/Math/acosh/length.js new file mode 100644 index 0000000000..6f7453974d --- /dev/null +++ b/test/built-ins/Math/acosh/length.js @@ -0,0 +1,25 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +es6id: 20.2.2.3 +description: length property of Math.acosh +info: > + Math.acosh ( x ) + + 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(Math.acosh.length, 1); + +verifyNotEnumerable(Math.acosh, "length"); +verifyNotWritable(Math.acosh, "length"); +verifyConfigurable(Math.acosh, "length"); diff --git a/test/built-ins/Math/asinh/asinh-length.js b/test/built-ins/Math/asinh/asinh-length.js deleted file mode 100644 index 6f7d623597..0000000000 --- a/test/built-ins/Math/asinh/asinh-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.asinh -es6id: 20.2.2.5 ----*/ - -assert.sameValue(Math.asinh.length, 1); - diff --git a/test/built-ins/Math/asinh/length.js b/test/built-ins/Math/asinh/length.js new file mode 100644 index 0000000000..643d74d34c --- /dev/null +++ b/test/built-ins/Math/asinh/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.asinh +es6id: 20.2.2.5 +info: > + Math.asinh ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.asinh.length, 1); + +verifyNotEnumerable(Math.asinh, "length"); +verifyNotWritable(Math.asinh, "length"); +verifyConfigurable(Math.asinh, "length"); diff --git a/test/built-ins/Math/atanh/atanh-length.js b/test/built-ins/Math/atanh/atanh-length.js deleted file mode 100644 index d34c85aee4..0000000000 --- a/test/built-ins/Math/atanh/atanh-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.atanh -es6id: 20.2.2.7 ----*/ - -assert.sameValue(Math.atanh.length, 1); - diff --git a/test/built-ins/Math/atanh/length.js b/test/built-ins/Math/atanh/length.js new file mode 100644 index 0000000000..8b88389a53 --- /dev/null +++ b/test/built-ins/Math/atanh/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.atanh +es6id: 20.2.2.7 +info: > + Math.atanh ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.atanh.length, 1); + +verifyNotEnumerable(Math.atanh, "length"); +verifyNotWritable(Math.atanh, "length"); +verifyConfigurable(Math.atanh, "length"); diff --git a/test/built-ins/Math/cbrt/cbrt-length.js b/test/built-ins/Math/cbrt/cbrt-length.js deleted file mode 100644 index fe2d7a1c35..0000000000 --- a/test/built-ins/Math/cbrt/cbrt-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.cbrt -es6id: 20.2.2.9 ----*/ - -assert.sameValue(Math.cbrt.length, 1); - diff --git a/test/built-ins/Math/cbrt/length.js b/test/built-ins/Math/cbrt/length.js new file mode 100644 index 0000000000..7f4f6576a1 --- /dev/null +++ b/test/built-ins/Math/cbrt/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.cbrt +es6id: 20.2.2.9 +info: > + Math.cbrt ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.cbrt.length, 1); + +verifyNotEnumerable(Math.cbrt, "length"); +verifyNotWritable(Math.cbrt, "length"); +verifyConfigurable(Math.cbrt, "length"); diff --git a/test/built-ins/Math/cosh/cosh-length.js b/test/built-ins/Math/cosh/cosh-length.js deleted file mode 100644 index 59e379d7bf..0000000000 --- a/test/built-ins/Math/cosh/cosh-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.cosh -es6id: 20.2.2.13 ----*/ - -assert.sameValue(Math.cosh.length, 1); - diff --git a/test/built-ins/Math/cosh/length.js b/test/built-ins/Math/cosh/length.js new file mode 100644 index 0000000000..de8dd44184 --- /dev/null +++ b/test/built-ins/Math/cosh/length.js @@ -0,0 +1,25 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +es6id: 20.2.2.13 +description: Length property of Math.cosh is 1 +info: > + Math.cosh ( x ) + + 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(Math.cosh.length, 1); + +verifyNotEnumerable(Math.cosh, "length"); +verifyNotWritable(Math.cosh, "length"); +verifyConfigurable(Math.cosh, "length"); diff --git a/test/built-ins/Math/expm1/expm1-length.js b/test/built-ins/Math/expm1/expm1-length.js deleted file mode 100644 index 4e01c6688a..0000000000 --- a/test/built-ins/Math/expm1/expm1-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.expm1 -es6id: 20.2.2.15 ----*/ - -assert.sameValue(Math.expm1.length, 1); - diff --git a/test/built-ins/Math/expm1/length.js b/test/built-ins/Math/expm1/length.js new file mode 100644 index 0000000000..1d26ff34f1 --- /dev/null +++ b/test/built-ins/Math/expm1/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.expm1 +es6id: 20.2.2.15 +info: > + Math.expm1 ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.expm1.length, 1); + +verifyNotEnumerable(Math.expm1, "length"); +verifyNotWritable(Math.expm1, "length"); +verifyConfigurable(Math.expm1, "length"); diff --git a/test/built-ins/Math/hypot/Math.hypot_lengthProp.js b/test/built-ins/Math/hypot/Math.hypot_lengthProp.js deleted file mode 100644 index 1bafa47549..0000000000 --- a/test/built-ins/Math/hypot/Math.hypot_lengthProp.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2014 Ryan Lewis. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -es6id: 20.2.2.18 -author: Ryan Lewis -description: Math.hypot.length should return 2. ----*/ - -assert.sameValue(Math.hypot.length, 2, 'Math.hypot.length'); diff --git a/test/built-ins/Math/hypot/length.js b/test/built-ins/Math/hypot/length.js new file mode 100644 index 0000000000..8810cfc88d --- /dev/null +++ b/test/built-ins/Math/hypot/length.js @@ -0,0 +1,29 @@ +// Copyright (c) 2014 Ryan Lewis. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 20.2.2.18 +author: Ryan Lewis +description: Math.hypot.length should return 2. +info: > + Math.hypot ( value1, value2, ...values ) + + 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, including optional + parameters. However, rest parameters 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(Math.hypot.length, 2); + +verifyNotEnumerable(Math.hypot, "length"); +verifyNotWritable(Math.hypot, "length"); +verifyConfigurable(Math.hypot, "length"); diff --git a/test/built-ins/Math/imul/imul-length.js b/test/built-ins/Math/imul/imul-length.js deleted file mode 100644 index ae299ca389..0000000000 --- a/test/built-ins/Math/imul/imul-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.imul -es6id: 20.2.2.19 ----*/ - -assert.sameValue(Math.imul.length, 2); - diff --git a/test/built-ins/Math/imul/length.js b/test/built-ins/Math/imul/length.js new file mode 100644 index 0000000000..ff64f3104f --- /dev/null +++ b/test/built-ins/Math/imul/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +es6id: 20.2.2.19 +description: length property of Math.imul +info: > + Math.imul ( x, y ) + + 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, including optional + parameters. However, rest parameters 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(Math.imul.length, 2); + +verifyNotEnumerable(Math.imul, "length"); +verifyNotWritable(Math.imul, "length"); +verifyConfigurable(Math.imul, "length"); diff --git a/test/built-ins/Math/log10/Log10-length.js b/test/built-ins/Math/log10/Log10-length.js deleted file mode 100644 index edab19b712..0000000000 --- a/test/built-ins/Math/log10/Log10-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.log10 -es6id: 20.2.2.20 ----*/ - -assert.sameValue(Math.log10.length, 1); - diff --git a/test/built-ins/Math/log10/length.js b/test/built-ins/Math/log10/length.js new file mode 100644 index 0000000000..02c4e28857 --- /dev/null +++ b/test/built-ins/Math/log10/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +es6id: 20.2.2.20 +description: length property of Math.log10 +info: > + Math.log10 ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.log10.length, 1); + +verifyNotEnumerable(Math.log10, "length"); +verifyNotWritable(Math.log10, "length"); +verifyConfigurable(Math.log10, "length"); diff --git a/test/built-ins/Math/log1p/Log1p-length.js b/test/built-ins/Math/log1p/Log1p-length.js deleted file mode 100644 index a0c254f060..0000000000 --- a/test/built-ins/Math/log1p/Log1p-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.log1p -es6id: 20.2.2.21 ----*/ - -assert.sameValue(Math.log1p.length, 1); - diff --git a/test/built-ins/Math/log1p/length.js b/test/built-ins/Math/log1p/length.js new file mode 100644 index 0000000000..3d38d50662 --- /dev/null +++ b/test/built-ins/Math/log1p/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +es6id: 20.2.2.21 +description: length property of Math.log1p +info: > + Math.log1p ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.log1p.length, 1); + +verifyNotEnumerable(Math.log1p, "length"); +verifyNotWritable(Math.log1p, "length"); +verifyConfigurable(Math.log1p, "length"); diff --git a/test/built-ins/Math/log2/length.js b/test/built-ins/Math/log2/length.js new file mode 100644 index 0000000000..921358c6c5 --- /dev/null +++ b/test/built-ins/Math/log2/length.js @@ -0,0 +1,28 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +es6id: 20.2.2.23 +description: length property of Math.log2 +info: > + Math.log2 ( x ) + + 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, including optional + parameters. However, rest parameters 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(Math.log2.length, 1); + +verifyNotEnumerable(Math.log2, "length"); +verifyNotWritable(Math.log2, "length"); +verifyConfigurable(Math.log2, "length"); diff --git a/test/built-ins/Math/log2/log2-length.js b/test/built-ins/Math/log2/log2-length.js deleted file mode 100644 index 1e55a41289..0000000000 --- a/test/built-ins/Math/log2/log2-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.log2 -es6id: 20.2.2.23 ----*/ - -assert.sameValue(Math.log2.length, 1); - diff --git a/test/built-ins/Math/max/length.js b/test/built-ins/Math/max/length.js new file mode 100644 index 0000000000..c8a132e6d0 --- /dev/null +++ b/test/built-ins/Math/max/length.js @@ -0,0 +1,26 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-math.max +description: > + "length" property of Math.max +info: > + Math.max ( value1, value2, ...values ) + + 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(Math.max.length, 2); + +verifyNotEnumerable(Math.max, "length"); +verifyNotWritable(Math.max, "length"); +verifyConfigurable(Math.max, "length"); diff --git a/test/built-ins/Math/min/length.js b/test/built-ins/Math/min/length.js new file mode 100644 index 0000000000..bd92613030 --- /dev/null +++ b/test/built-ins/Math/min/length.js @@ -0,0 +1,26 @@ +// Copyright (C) 2017 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-math.min +description: > + "length" property of Math.min +info: > + Math.min ( value1, value2, ...values ) + + 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(Math.min.length, 2); + +verifyNotEnumerable(Math.min, "length"); +verifyNotWritable(Math.min, "length"); +verifyConfigurable(Math.min, "length"); diff --git a/test/built-ins/Math/sign/length.js b/test/built-ins/Math/sign/length.js new file mode 100644 index 0000000000..cafd6af529 --- /dev/null +++ b/test/built-ins/Math/sign/length.js @@ -0,0 +1,25 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.sign +es6id: 20.2.2.29 +info: > + Math.sign ( x ) + + 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(Math.sign.length, 1); + +verifyNotEnumerable(Math.sign, "length"); +verifyNotWritable(Math.sign, "length"); +verifyConfigurable(Math.sign, "length"); diff --git a/test/built-ins/Math/sign/sign-length.js b/test/built-ins/Math/sign/sign-length.js deleted file mode 100644 index 22427b6c70..0000000000 --- a/test/built-ins/Math/sign/sign-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.sign -es6id: 20.2.2.29 ----*/ - -assert.sameValue(Math.sign.length, 1); - diff --git a/test/built-ins/Math/sinh/length.js b/test/built-ins/Math/sinh/length.js new file mode 100644 index 0000000000..c178c1b793 --- /dev/null +++ b/test/built-ins/Math/sinh/length.js @@ -0,0 +1,25 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.sinh +es6id: 20.2.2.31 +info: > + Math.sinh ( x ) + + 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(Math.sinh.length, 1); + +verifyNotEnumerable(Math.sinh, "length"); +verifyNotWritable(Math.sinh, "length"); +verifyConfigurable(Math.sinh, "length"); diff --git a/test/built-ins/Math/sinh/sinh-length.js b/test/built-ins/Math/sinh/sinh-length.js deleted file mode 100644 index d471b4ef60..0000000000 --- a/test/built-ins/Math/sinh/sinh-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.sinh -es6id: 20.2.2.31 ----*/ - -assert.sameValue(Math.sinh.length, 1); - diff --git a/test/built-ins/Math/tanh/length.js b/test/built-ins/Math/tanh/length.js new file mode 100644 index 0000000000..6736d3d2de --- /dev/null +++ b/test/built-ins/Math/tanh/length.js @@ -0,0 +1,25 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.tanh +es6id: 20.2.2.34 +info: > + Math.tanh ( x ) + + 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(Math.tanh.length, 1); + +verifyNotEnumerable(Math.tanh, "length"); +verifyNotWritable(Math.tanh, "length"); +verifyConfigurable(Math.tanh, "length"); diff --git a/test/built-ins/Math/tanh/tanh-length.js b/test/built-ins/Math/tanh/tanh-length.js deleted file mode 100644 index d7000a06dd..0000000000 --- a/test/built-ins/Math/tanh/tanh-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.tanh -es6id: 20.2.2.34 ----*/ - -assert.sameValue(Math.tanh.length, 1); - diff --git a/test/built-ins/Math/trunc/length.js b/test/built-ins/Math/trunc/length.js new file mode 100644 index 0000000000..f3d55c0f4d --- /dev/null +++ b/test/built-ins/Math/trunc/length.js @@ -0,0 +1,25 @@ +// Copyright 2015 Microsoft Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +description: length property of Math.trunc +es6id: 20.2.2.35 +info: > + Math.trunc ( x ) + + 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(Math.trunc.length, 1); + +verifyNotEnumerable(Math.trunc, "length"); +verifyNotWritable(Math.trunc, "length"); +verifyConfigurable(Math.trunc, "length"); diff --git a/test/built-ins/Math/trunc/trunc-length.js b/test/built-ins/Math/trunc/trunc-length.js deleted file mode 100644 index b4381936f2..0000000000 --- a/test/built-ins/Math/trunc/trunc-length.js +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2015 Microsoft Corporation. All rights reserved. -// This code is governed by the license found in the LICENSE file. - -/*--- -description: Testing length property of Math.trunc -es6id: 20.2.2.35 ----*/ - -assert.sameValue(Math.trunc.length, 1); -