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_A3.4_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.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_A3.4_T7</p>
64 <div id='console'></div>
65 <script>
66 try {
67
68 /**
69  * @name: S7.8.3_A3.4_T7;
70  * @section: 7.8.3;
71  * @assertion: DecimalLiteral :: DecimalIntegerLiteral. DecimalDigigts ExponentPart;
72  * @description: ExponentPart :: e 0;
73 */
74
75 //CHECK#0
76 if (0.0e0 !== 0.0) {
77   testFailed('#0: 0.0e0 === 0.0');
78 }
79
80 //CHECK#1
81 if (1.1e0 !== 1.1) {
82   testFailed('#1: 1.1e0 === 1.1');
83 }
84
85 //CHECK#2
86 if (2.2e0 !== 2.2) {
87   testFailed('#2: 2.2e0 === 2.2');
88 }
89
90 //CHECK#3
91 if (3.3e0 !== 3.3) {
92   testFailed('#3: 3.3e0 === 3.3');
93 }
94
95 //CHECK#4
96 if (4.4e0 !== 4.4) {
97   testFailed('#4: 4.4e0 === 4.4');
98 }
99
100 //CHECK#5
101 if (5.5e0 !== 5.5) {
102   testFailed('#5: 5.5e0 === 5.5');
103 }
104
105 //CHECK#6
106 if (6.6e0 !== 6.6) {
107   testFailed('#6: 6.e0 === 6.6');
108 }
109
110 //CHECK#7
111 if (7.7e0 !== 7.7) {
112   testFailed('#7: 7.7e0 === 7.7');
113 }
114
115 //CHECK#8
116 if (8.8e0 !== 8.8) {
117   testFailed('#8: 8.8e0 === 8.8');
118 }
119
120 //CHECK#9
121 if (9.9e0 !== 9.9) {
122   testFailed('#9: 9.9e0 === 9.9');
123 }
124
125 } catch (ex) {
126     sputnikException = ex;
127 }
128
129 var successfullyParsed = true;
130 </script>
131
132 <script>
133 if (!successfullyParsed)
134     printTestFailed('successfullyParsed is not set');
135 else if (sputnikException)
136     printTestFailed(sputnikException);
137 else
138     printTestPassed("");
139 testPrint('<br /><span class="pass">TEST COMPLETE</span>');
140 </script>
141 </body>
142 </html>