Fixing the change log entry.
[WebKit-https.git] / LayoutTests / fast / js / sputnik / Conformance / 07_Lexical_Conventions / 7.8_Literals / 7.8.3_Numeric_Literals / S7.8.3_A5.1_T7.html
1 <html>
2 <head>
3 <meta charset='utf-8'>
4 <style>
5 .pass {
6     font-weight: bold;
7     color: green;
8 }
9 .fail {
10     font-weight: bold;
11     color: red;
12 }
13 </style>
14
15 <script>
16 if (window.layoutTestController)
17     layoutTestController.dumpAsText();
18
19 function SputnikError(message)
20 {
21     this.message = message;
22 }
23
24 SputnikError.prototype.toString = function ()
25 {
26     return 'SputnikError: ' + this.message;
27 };
28
29 var sputnikException;
30
31 function testPrint(msg)
32 {
33     var span = document.createElement("span");
34     document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace 
35     span.innerHTML = msg + '<br />';
36 }
37
38 function escapeHTML(text)
39 {
40     return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
41 }
42
43 function printTestPassed(msg)
44 {
45     testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
46 }
47
48 function printTestFailed(msg)
49 {
50     testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
51 }
52
53 function testFailed(msg)
54 {
55     throw new SputnikError(msg);
56 }
57
58 var successfullyParsed = false;
59 </script>
60
61 </head>
62 <body>
63 <p>S7.8.3_A5.1_T7</p>
64 <div id='console'></div>
65 <script>
66 try {
67
68 /**
69  * @name: S7.8.3_A5.1_T7;
70  * @section: 7.8.3;
71  * @assertion: DecimalLiteral :: HexIntegerLiteral;  
72  * @description: HexIntegerLiteral :: 0x one of a, b, c, d, e, f;
73 */
74
75 //CHECK#a
76 if (0xa !== 10) {
77   testFailed('#a: 0xa === 10');
78 }
79
80 //CHECK#b
81 if (0xb !== 11) {
82   testFailed('#b: 0xb === 11');
83 }
84
85 //CHECK#c
86 if (0xc !== 12) {
87   testFailed('#c: 0xc === 12');
88 }
89
90 //CHECK#d
91 if (0xd !== 13) {
92   testFailed('#d: 0xd === 13');
93 }
94
95 //CHECK#e
96 if (0xe !== 14) {
97   testFailed('#e: 0xe === 14');
98 }
99
100 //CHECK#f
101 if (0xf !== 15) {
102   testFailed('#f: 0xf === 15');
103 }
104
105 } catch (ex) {
106     sputnikException = ex;
107 }
108
109 var successfullyParsed = true;
110 </script>
111
112 <script>
113 if (!successfullyParsed)
114     printTestFailed('successfullyParsed is not set');
115 else if (sputnikException)
116     printTestFailed(sputnikException);
117 else
118     printTestPassed("");
119 testPrint('<br /><span class="pass">TEST COMPLETE</span>');
120 </script>
121 </body>
122 </html>