summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Number/isSafeInteger/arg-is-not-number.js
blob: d6b7e3f6406b61394bd61dc88d87d8d5167fc953 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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 not Number
info: |
  Number.isSafeInteger ( number )

  1. If Type(number) is not Number, return false.
  [...]
features: [Symbol]
---*/

assert.sameValue(Number.isSafeInteger("1"), false, "string");
assert.sameValue(Number.isSafeInteger([1]), false, "[1]");
assert.sameValue(Number.isSafeInteger(new Number(42)), false, "Number object");
assert.sameValue(Number.isSafeInteger(false), false, "false");
assert.sameValue(Number.isSafeInteger(true), false, "true");
assert.sameValue(Number.isSafeInteger(undefined), false, "undefined");
assert.sameValue(Number.isSafeInteger(null), false, "null");
assert.sameValue(Number.isSafeInteger(Symbol("1")), false, "symbol");
assert.sameValue(Number.isSafeInteger(), false, "no arg");

reportCompare(0, 0);