Debian Codegraph @

js/src/tests/test262/language/expressions/equals/S11.9.1_A1.js

raw
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 info: |
6 White Space and Line Terminator between EqualityExpression and "==" or
7 between "==" and RelationalExpression are allowed
8 es5id: 11.9.1_A1
9 description: Checking by using eval
10 ---*/
11
12 //CHECK#1
13 if (eval("true\u0009==\u00091") !== true) {
14 throw new Test262Error('#1: (true\\u0009==\\u00091) === true');
15 }
16
17 //CHECK#2
18 if (eval("true\u000B==\u000B1") !== true) {
19 throw new Test262Error('#2: (true\\u000B==\\u000B1) === true');
20 }
21
22 //CHECK#3
23 if (eval("true\u000C==\u000C1") !== true) {
24 throw new Test262Error('#3: (true\\u000C==\\u000C1) === true');
25 }
26
27 //CHECK#4
28 if (eval("true\u0020==\u00201") !== true) {
29 throw new Test262Error('#4: (true\\u0020==\\u00201) === true');
30 }
31
32 //CHECK#5
33 if (eval("true\u00A0==\u00A01") !== true) {
34 throw new Test262Error('#5: (true\\u00A0==\\u00A01) === true');
35 }
36
37 //CHECK#6
38 if (eval("true\u000A==\u000A1") !== true) {
39 throw new Test262Error('#6: (true\\u000A==\\u000A1) === true');
40 }
41
42 //CHECK#7
43 if (eval("true\u000D==\u000D1") !== true) {
44 throw new Test262Error('#7: (true\\u000D==\\u000D1) === true');
45 }
46
47 //CHECK#8
48 if (eval("true\u2028==\u20281") !== true) {
49 throw new Test262Error('#8: (true\\u2028==\\u20281) === true');
50 }
51
52 //CHECK#9
53 if (eval("true\u2029==\u20291") !== true) {
54 throw new Test262Error('#9: (true\\u2029==\\u20291) === true');
55 }
56
57 //CHECK#10
58 if (eval("true\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029==\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291") !== true) {
59 throw new Test262Error('#10: (true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029==\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === true');
60 }
61
62 reportCompare(0, 0);