aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A5.1_T7.js
blob: 3b5a2f494d2f2007262fe4854ab22572091e48b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
 * @name: S7.8.3_A5.1_T7;
 * @section: 7.8.3;
 * @assertion: DecimalLiteral :: HexIntegerLiteral;  
 * @description: HexIntegerLiteral :: 0x one of a, b, c, d, e, f;
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S7.8.3_A5.1_T7",

path: "TestCases/07_Lexical_Conventions/7.8_Literals/7.8.3_Numeric_Literals/S7.8.3_A5.1_T7.js",

assertion: "DecimalLiteral :: HexIntegerLiteral",

description: "HexIntegerLiteral :: 0x one of a, b, c, d, e, f",

test: function testcase() {
   //CHECK#a
if (0xa !== 10) {
  $ERROR('#a: 0xa === 10');
}

//CHECK#b
if (0xb !== 11) {
  $ERROR('#b: 0xb === 11');
}

//CHECK#c
if (0xc !== 12) {
  $ERROR('#c: 0xc === 12');
}

//CHECK#d
if (0xd !== 13) {
  $ERROR('#d: 0xd === 13');
}

//CHECK#e
if (0xe !== 14) {
  $ERROR('#e: 0xe === 14');
}

//CHECK#f
if (0xf !== 15) {
  $ERROR('#f: 0xf === 15');
}

 }
});