S9.3.1_A5_T1.js (958B)
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: | 6 The MV of StrDecimalLiteral::: - StrUnsignedDecimalLiteral is the negative 7 of the MV of StrUnsignedDecimalLiteral. (the negative of this 0 is also 0) 8 es5id: 9.3.1_A5_T1 9 description: Compare Number('-any_number') with -Number('any_number') 10 ---*/ 11 assert.sameValue(Number("-0"), -0); 12 assert.sameValue(Number("-Infinity"), -Infinity); 13 14 assert.sameValue( 15 Number("-1234567890"), 16 -1234567890 17 ); 18 19 assert.sameValue(Number("-1234.5678"), -1234.5678); 20 21 assert.sameValue( 22 Number("-1234.5678e90"), 23 -1234.5678e90 24 ); 25 26 assert.sameValue( 27 Number("-1234.5678E90"), 28 -1234.5678E90 29 ); 30 31 assert.sameValue( 32 Number("-1234.5678e-90"), 33 -1234.5678e-90 34 ); 35 36 assert.sameValue( 37 Number("-1234.5678E-90"), 38 -1234.5678E-90 39 ); 40 41 assert.sameValue( 42 Number("-Infinity"), 43 Number.NEGATIVE_INFINITY 44 ); 45 46 reportCompare(0, 0);