nans.js (545B)
1 // Copyright (C) 2017 Rick Waldron, 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 description: > 5 Including nans.js will expose: 6 7 var NaNs = [ 8 NaN, 9 Number.NaN, 10 NaN * 0, 11 0/0, 12 Infinity/Infinity, 13 -(0/0), 14 Math.pow(-1, 0.5), 15 -Math.pow(-1, 0.5), 16 Number("Not-a-Number"), 17 ]; 18 19 includes: [nans.js] 20 ---*/ 21 22 for (var i = 0; i < NaNs.length; i++) { 23 assert.sameValue(Number.isNaN(NaNs[i]), true, "index: " + i); 24 } 25 26 reportCompare(0, 0);