Update length descriptor tests for Math properties

This commit is contained in:
Leonardo Balter 2017-03-02 18:17:19 -05:00 committed by Leo Balter
parent f45341ca4e
commit 238f4caa9a
32 changed files with 455 additions and 150 deletions

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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');

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);

View File

@ -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");

View File

@ -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);