S7.8.3_A5.1_T4.js (1064B)
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: "DecimalLiteral :: HexIntegerLiteral" 6 es5id: 7.8.3_A5.1_T4 7 description: "HexIntegerLiteral :: 0X NonZeroDigit Digits" 8 ---*/ 9 10 //CHECK#0 11 if (0X0 !== 0) { 12 throw new Test262Error('#0: 0X0 === 0'); 13 } 14 15 //CHECK#1 16 if (0X1 !== 1) { 17 throw new Test262Error('#1: 0X1 === 1'); 18 } 19 20 //CHECK#2 21 if (0X10 !== 16) { 22 throw new Test262Error('#2: 0X10 === 16'); 23 } 24 25 //CHECK3 26 if (0X100 !== 256) { 27 throw new Test262Error('3: 0X100 === 256'); 28 } 29 30 //CHECK#4 31 if (0X1000 !== 4096) { 32 throw new Test262Error('#4: 0X1000 === 4096'); 33 } 34 35 //CHECK#5 36 if (0X10000 !== 65536) { 37 throw new Test262Error('#5: 0X10000 === 65536'); 38 } 39 40 //CHECK#6 41 if (0X100000 !== 1048576) { 42 throw new Test262Error('#6: 0X100000 === 1048576'); 43 } 44 45 //CHECK#7 46 if (0X1000000 !== 16777216) { 47 throw new Test262Error('#7: 0X1000000 === 16777216'); 48 } 49 50 //CHECK#8 51 if (0X10000000 !== 268435456) { 52 throw new Test262Error('#8: 0X10000000 === 268435456'); 53 } 54 55 reportCompare(0, 0);