mirror of https://github.com/tc39/test262.git
Update tests for Math.acosh
This commit is contained in:
parent
561ac9e473
commit
440211e96a
|
@ -1,19 +0,0 @@
|
|||
// Copyright 2015 Microsoft Corporation. All rights reserved.
|
||||
// This code is governed by the license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: Math.acosh with special values
|
||||
es6id: 20.2.2.3
|
||||
---*/
|
||||
|
||||
assert.sameValue(Math.acosh(NaN), Number.NaN,
|
||||
"Math.acosh produces incorrect output for NaN");
|
||||
assert.sameValue(Math.acosh(0), Number.NaN,
|
||||
"Math.acosh should produce NaN for values < 1");
|
||||
assert.sameValue(Math.acosh(Number.NEGATIVE_INFINITY), Number.NaN,
|
||||
"Math.acosh should produce NaN for inputs <1");
|
||||
assert.notSameValue(Math.acosh(Number.NEGATIVE_INFINITY),
|
||||
Number.POSITIVE_INFINITY,
|
||||
"Math.acosh should produce POSITIVE_INFINITY for input Number.POSITIVE_INFINITY");
|
||||
assert.sameValue(Math.acosh(+1), 0, "Math.acosh should produce 0 for +1");
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (C) 2016 The V8 Project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
es6id: 20.2.2.3
|
||||
esid: sec-math.acosh
|
||||
description: >
|
||||
Return Infinity if x is Infinity
|
||||
info: |
|
||||
Math.acosh ( x )
|
||||
|
||||
If x is +∞, the result is +∞.
|
||||
---*/
|
||||
|
||||
assert.sameValue(Math.acosh(Infinity), Infinity);
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2015 Microsoft Corporation. All rights reserved.
|
||||
// This code is governed by the license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: Math.acosh(1) returns +0
|
||||
es6id: 20.2.2.3
|
||||
info: |
|
||||
Math.acosh ( x )
|
||||
|
||||
- If x is 1, the result is +0.
|
||||
---*/
|
||||
|
||||
assert.sameValue(Math.acosh(+1), 0, "Math.acosh should produce 0 for +1");
|
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2015 Microsoft Corporation. All rights reserved.
|
||||
// This code is governed by the license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: Math.acosh with special values
|
||||
es6id: 20.2.2.3
|
||||
info: |
|
||||
Math.acosh ( x )
|
||||
|
||||
- If x is NaN, the result is NaN.
|
||||
- If x is less than 1, the result is NaN.
|
||||
---*/
|
||||
|
||||
assert.sameValue(Math.acosh(NaN), NaN, "NaN");
|
||||
assert.sameValue(Math.acosh(0.999999), NaN, "0.999999");
|
||||
assert.sameValue(Math.acosh(0), NaN, "0");
|
||||
assert.sameValue(Math.acosh(-1), NaN, "-1");
|
||||
assert.sameValue(Math.acosh(-Infinity), NaN, "-Infinity");
|
Loading…
Reference in New Issue