S11.4.7_A4.1.js (505B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: If x is NaN, operator -x returns NaN 6 es5id: 11.4.7_A4.1 7 description: Checking NaN 8 ---*/ 9 10 //CHECK#1 11 if (isNaN(-NaN) !== true) { 12 throw new Test262Error('#1: -NaN === Not-a-Number. Actual: ' + (-NaN)); 13 } 14 15 //CHECK#2 16 var x = NaN; 17 if (isNaN(-x) != true) { 18 throw new Test262Error('#2: var x = NaN; -x === Not-a-Number. Actual: ' + (-x)); 19 } 20 21 reportCompare(0, 0);