diff --git a/test/built-ins/Math/acosh/acosh-specialVals.js b/test/built-ins/Math/acosh/acosh-specialVals.js deleted file mode 100644 index 484eb3b016..0000000000 --- a/test/built-ins/Math/acosh/acosh-specialVals.js +++ /dev/null @@ -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"); - diff --git a/test/built-ins/Math/acosh/arg-is-infinity.js b/test/built-ins/Math/acosh/arg-is-infinity.js new file mode 100644 index 0000000000..259324d913 --- /dev/null +++ b/test/built-ins/Math/acosh/arg-is-infinity.js @@ -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); diff --git a/test/built-ins/Math/acosh/arg-is-one.js b/test/built-ins/Math/acosh/arg-is-one.js new file mode 100644 index 0000000000..d41e51611b --- /dev/null +++ b/test/built-ins/Math/acosh/arg-is-one.js @@ -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"); diff --git a/test/built-ins/Math/acosh/nan-returns.js b/test/built-ins/Math/acosh/nan-returns.js new file mode 100644 index 0000000000..4917b4905c --- /dev/null +++ b/test/built-ins/Math/acosh/nan-returns.js @@ -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");