StringObjectUse should not be a structure check for the original string object structure
[WebKit-https.git] / LayoutTests / sputnik / Conformance / 07_Lexical_Conventions / 7.8_Literals / 7.8.3_Numeric_Literals / S7.8.3_A1.1_T2.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.testRunner)
17     testRunner.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_A1.1_T2</p>
64 <div id='console'></div>
65 <script>
66 try {
67
68 /**
69  * @name: S7.8.3_A1.1_T2;
70  * @section: 7.8.3;
71  * @assertion: DecimalLiteral :: DecimalIntegerLiteral;  
72  * @description: DecimalIntegerLiteral :: NoNZeroDigit DecimalDigits;
73 */
74
75
76 //CHECK#1
77 if (11 !== 11) {
78   testFailed('#1: 11 === 11');
79 }
80
81 //CHECK#2
82 if (22 !== 22) {
83   testFailed('#2: 22 === 22');
84 }
85
86 //CHECK#3
87 if (33 !== 33) {
88   testFailed('#3: 33 === 33');
89 }
90
91 //CHECK#4
92 if (44 !== 44) {
93   testFailed('#4: 44 === 44');
94 }
95
96 //CHECK#5
97 if (55 !== 55) {
98   testFailed('#5: 55 === 55');
99 }
100
101 //CHECK#6
102 if (66 !== 66) {
103   testFailed('#6: 66 === 66');
104 }
105
106 //CHECK#7
107 if (77 !== 77) {
108   testFailed('#7: 77 === 77');
109 }
110
111 //CHECK#8
112 if (88 !== 88) {
113   testFailed('#8: 88 === 88');
114 }
115
116 //CHECK#9
117 if (99 !== 99) {
118   testFailed('#9: 99 === 99');
119 }
120
121 } catch (ex) {
122     sputnikException = ex;
123 }
124
125 var successfullyParsed = true;
126 </script>
127
128 <script>
129 if (!successfullyParsed)
130     printTestFailed('successfullyParsed is not set');
131 else if (sputnikException)
132     printTestFailed(sputnikException);
133 else
134     printTestPassed("");
135 testPrint('<br /><span class="pass">TEST COMPLETE</span>');
136 </script>
137 </body>
138 </html>