test262/test/built-ins/Math/sign/sign-specialVals.js

15 lines
534 B
JavaScript
Raw Normal View History

2015-05-14 22:59:12 +02:00
// Copyright 2015 Microsoft Corporation. All rights reserved.
// This code is governed by the license found in the LICENSE file.
/*---
description: Math.sign with special values
es6id: 20.2.2.29
---*/
assert.sameValue(Math.sign(NaN), Number.NaN,
"Math.sign produces incorrect output for NaN");
assert.sameValue(1/Math.sign(-0), Number.NEGATIVE_INFINITY,
"Math.sign produces incorrect output for -0");
assert.sameValue(1/Math.sign(0), Number.POSITIVE_INFINITY,
"Math.sign produces incorrect output for 0");