summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Number/isSafeInteger/infinity.js
blob: 53642c9289882e87258f9e632546ad1accc58331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) 2016 The V8 Project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-number.issafeinteger
description: >
  Return false if argument is an Infinity value
info: |
  Number.isSafeInteger ( number )

  [...]
  2. If number is NaN, +∞, or -∞, return false.
  [...]
---*/

assert.sameValue(Number.isSafeInteger(Infinity), false, "Infinity");
assert.sameValue(Number.isSafeInteger(-Infinity), false, "-Infinity");

reportCompare(0, 0);