S15.1.1.2_A1.js (710B)
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: The initial value of Infinity is Number.POSITIVE_INFINITY 6 es5id: 15.1.1.2_A1 7 description: Use typeof, isNaN, isFinite 8 ---*/ 9 assert.sameValue(typeof(Infinity), "number", 'The value of `typeof(Infinity)` is expected to be "number"'); 10 assert.sameValue(isFinite(Infinity), false, 'isFinite(Infinity) must return false'); 11 assert.sameValue(isNaN(Infinity), false, 'isNaN(Infinity) must return false'); 12 13 assert.sameValue( 14 Infinity, 15 Number.POSITIVE_INFINITY, 16 'The value of Infinity is expected to equal the value of Number.POSITIVE_INFINITY' 17 ); 18 19 reportCompare(0, 0);