Debian Codegraph @

js/src/tests/test262/language/literals/string/S7.8.4_A7.1_T1.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 EscapeSequence :: UnicodeEscapeSequence :: u HexDigit HexDigit HexDigit
7 HexDigit
8 es5id: 7.8.4_A7.1_T1
9 description: Check similar to ("\u0000" === String.fromCharCode("0"))
10 ---*/
11
12 //CHECK#0
13 if ("\u0000" !== String.fromCharCode("0")) {
14 throw new Test262Error('#0: "\\u0000" === String.fromCharCode("0")');
15 }
16
17 //CHECK#1
18 if ("\u0001" !== String.fromCharCode("1")) {
19 throw new Test262Error('#1: "\\u0001" === String.fromCharCode("1")');
20 }
21
22 //CHECK#2
23 if ("\u0002" !== String.fromCharCode("2")) {
24 throw new Test262Error('#2: "\\u0002" === String.fromCharCode("2")');
25 }
26
27 //CHECK#3
28 if ("\u0003" !== String.fromCharCode("3")) {
29 throw new Test262Error('#3: "\\u0003" === String.fromCharCode("3")');
30 }
31
32 //CHECK#4
33 if ("\u0004" !== String.fromCharCode("4")) {
34 throw new Test262Error('#4: "\\u0004" === String.fromCharCode("4")');
35 }
36
37 //CHECK#5
38 if ("\u0005" !== String.fromCharCode("5")) {
39 throw new Test262Error('#5: "\\u0005" === String.fromCharCode("5")');
40 }
41
42 //CHECK#6
43 if ("\u0006" !== String.fromCharCode("6")) {
44 throw new Test262Error('#6: "\\u0006" === String.fromCharCode("6")');
45 }
46
47 //CHECK#7
48 if ("\u0007" !== String.fromCharCode("7")) {
49 throw new Test262Error('#7: "\\u0007" === String.fromCharCode("7")');
50 }
51
52 //CHECK#8
53 if ("\u0008" !== String.fromCharCode("8")) {
54 throw new Test262Error('#8: "\\u0008" === String.fromCharCode("8")');
55 }
56
57 //CHECK#9
58 if ("\u0009" !== String.fromCharCode("9")) {
59 throw new Test262Error('#9: "\\u0009" === String.fromCharCode("9")');
60 }
61
62 //CHECK#A
63 if ("\u000A" !== String.fromCharCode("10")) {
64 throw new Test262Error('#A: "\\u000A" === String.fromCharCode("10")');
65 }
66
67 //CHECK#B
68 if ("\u000B" !== String.fromCharCode("11")) {
69 throw new Test262Error('#B: "\\u000B" === String.fromCharCode("11")');
70 }
71
72 //CHECK#C
73 if ("\u000C" !== String.fromCharCode("12")) {
74 throw new Test262Error('#C: "\\u000C" === String.fromCharCode("12")');
75 }
76
77 //CHECK#D
78 if ("\u000D" !== String.fromCharCode("13")) {
79 throw new Test262Error('#D: "\\u000D" === String.fromCharCode("13")');
80 }
81
82 //CHECK#E
83 if ("\u000E" !== String.fromCharCode("14")) {
84 throw new Test262Error('#E: "\\u000E" === String.fromCharCode("14")');
85 }
86
87 //CHECK#F
88 if ("\u000F" !== String.fromCharCode("15")) {
89 throw new Test262Error('#F: "\\u000F" === String.fromCharCode("15")');
90 }
91
92 reportCompare(0, 0);