2017-06-28 17:53:30 +02:00
|
|
|
// Copyright (C) 2017 Rick Waldron, 2016 the V8 project authors. All rights reserved.
|
2017-06-23 17:09:21 +02:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
description: >
|
2018-03-09 20:47:05 +01:00
|
|
|
Including nans.js will expose:
|
2017-06-23 17:09:21 +02:00
|
|
|
|
2018-03-09 20:47:05 +01:00
|
|
|
var NaNs = [
|
2018-03-23 01:20:29 +01:00
|
|
|
NaN,
|
|
|
|
Number.NaN,
|
|
|
|
NaN * 0,
|
|
|
|
0/0,
|
|
|
|
Infinity/Infinity,
|
|
|
|
-(0/0),
|
|
|
|
Math.pow(-1, 0.5),
|
|
|
|
-Math.pow(-1, 0.5),
|
|
|
|
Number("Not-a-Number"),
|
2018-03-09 20:47:05 +01:00
|
|
|
];
|
2017-06-23 17:09:21 +02:00
|
|
|
|
|
|
|
includes: [nans.js]
|
|
|
|
---*/
|
|
|
|
|
2018-03-09 20:47:05 +01:00
|
|
|
for (var i = 0; i < NaNs.length; i++) {
|
2018-03-23 01:20:29 +01:00
|
|
|
assert.sameValue(Number.isNaN(NaNs[i]), true, "index: " + i);
|
2018-03-09 20:47:05 +01:00
|
|
|
}
|