Debian Codegraph @

js/src/tests/test262/built-ins/isNaN/return-true-nan.js

raw
1 // Copyright (C) 2016 The V8 Project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-isnan-number
6 description: >
7 Return true if number is NaN
8 info: |
9 isNaN (number)
10
11 1. Let num be ? ToNumber(number).
12 2. If num is NaN, return true.
13 includes: [nans.js]
14 ---*/
15
16 NaNs.forEach(function(v, i) {
17 assert.sameValue(isNaN(v), true, "value on position: " + i);
18 });
19
20 reportCompare(0, 0);