|
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 * White Space and Line Terminator between "typeof" and UnaryExpression are allowed |
|
6 * |
|
7 * @path ch11/11.4/11.4.3/S11.4.3_A1.js |
|
8 * @description Checking by using eval |
|
9 */ |
|
10 |
|
11 //CHECK#1 |
|
12 if (eval("var x = 0; typeof\u0009x") !== "number") { |
|
13 $ERROR('#1: var x = 0; typeof\\u0009x; x === "number". Actual: ' + (x)); |
|
14 } |
|
15 |
|
16 //CHECK#2 |
|
17 if (eval("var x = 0; typeof\u000Bx") !== "number") { |
|
18 $ERROR('#2: var x = 0; typeof\\u000Bx; x === "number". Actual: ' + (x)); |
|
19 } |
|
20 |
|
21 //CHECK#3 |
|
22 if (eval("var x = 0; typeof\u000Cx") !== "number") { |
|
23 $ERROR('#3: var x = 0; typeof\\u000Cx; x === "number". Actual: ' + (x)); |
|
24 } |
|
25 |
|
26 //CHECK#4 |
|
27 if (eval("var x = 0; typeof\u0020x") !== "number") { |
|
28 $ERROR('#4: var x = 0; typeof\\u0020x; x === "number". Actual: ' + (x)); |
|
29 } |
|
30 |
|
31 //CHECK#5 |
|
32 if (eval("var x = 0; typeof\u00A0x") !== "number") { |
|
33 $ERROR('#5: var x = 0; typeof\\u00A0x; x === "number". Actual: ' + (x)); |
|
34 } |
|
35 |
|
36 //CHECK#6 |
|
37 if (eval("var x = 0; typeof\u000Ax") !== "number") { |
|
38 $ERROR('#6: var x = 0; typeof\\u000Ax; x === "number". Actual: ' + (x)); |
|
39 } |
|
40 |
|
41 //CHECK#7 |
|
42 if (eval("var x = 0; typeof\u000Dx") !== "number") { |
|
43 $ERROR('#7: var x = 0; typeof\\u000Dx; x === "number". Actual: ' + (x)); |
|
44 } |
|
45 |
|
46 //CHECK#8 |
|
47 if (eval("var x = 0; typeof\u2028x") !== "number") { |
|
48 $ERROR('#8: var x = 0; typeof\\u2028x; x === "number". Actual: ' + (x)); |
|
49 } |
|
50 |
|
51 //CHECK#9 |
|
52 if (eval("var x = 0; typeof\u2029x") !== "number") { |
|
53 $ERROR('#9: var x = 0; typeof\\u2029x; x === "number". Actual: ' + (x)); |
|
54 } |
|
55 |
|
56 //CHECK#10 |
|
57 if (eval("var x = 0; typeof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x") !== "number") { |
|
58 $ERROR('#10: var x = 0; typeof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === "number". Actual: ' + (x)); |
|
59 } |
|
60 |