Debian Codegraph @

js/src/tests/test262/built-ins/global/S10.2.3_A1.3_T3.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 Global object has properties such as built-in objects such as
7 Math, String, Date, parseInt, etc
8 es5id: 10.2.3_A1.3_T3
9 description: Eval execution context - Constructor Properties
10 ---*/
11
12 var evalStr =
13 '//CHECK#13\n'+
14 'if ( Object === null ) {\n'+
15 ' throw new Test262Error("#13: Object === null");\n'+
16 '}\n'+
17
18 '//CHECK#14\n'+
19 'if ( Function === null ) {\n'+
20 ' throw new Test262Error("#14: Function === null");\n'+
21 '}\n'+
22
23 '//CHECK#15\n'+
24 'if ( String === null ) {\n'+
25 ' throw new Test262Error("#15: String === null");\n'+
26 '}\n'+
27
28 '//CHECK#16\n'+
29 'if ( Number === null ) {\n'+
30 ' throw new Test262Error("#16: Function === null");\n'+
31 '}\n'+
32
33 '//CHECK#17\n'+
34 'if ( Array === null ) {\n'+
35 ' throw new Test262Error("#17: Array === null");\n'+
36 '}\n'+
37
38 '//CHECK#18\n'+
39 'if ( Boolean === null ) {\n'+
40 ' throw new Test262Error("#20: Boolean === null");\n'+
41 '}\n'+
42
43 '//CHECK#18\n'+
44 'if ( Date === null ) {\n'+
45 ' throw new Test262Error("#18: Date === null");\n'+
46 '}\n'+
47
48 '//CHECK#19\n'+
49 'if ( RegExp === null ) {\n'+
50 ' throw new Test262Error("#19: RegExp === null");\n'+
51 '}\n'+
52
53 '//CHECK#20\n'+
54 'if ( Error === null ) {\n'+
55 ' throw new Test262Error("#20: Error === null");\n'+
56 '}\n'+
57
58 '//CHECK#21\n'+
59 'if ( EvalError === null ) {\n'+
60 ' throw new Test262Error("#21: EvalError === null");\n'+
61 '}\n'+
62
63 '//CHECK#22\n'+
64 'if ( RangeError === null ) {\n'+
65 ' throw new Test262Error("#22: RangeError === null");\n'+
66 '}\n'+
67
68 '//CHECK#23\n'+
69 'if ( ReferenceError === null ) {\n'+
70 ' throw new Test262Error("#23: ReferenceError === null");\n'+
71 '}\n'+
72
73 '//CHECK#24\n'+
74 'if ( SyntaxError === null ) {\n'+
75 ' throw new Test262Error("#24: SyntaxError === null");\n'+
76 '}\n'+
77
78 '//CHECK#25\n'+
79 'if ( TypeError === null ) {\n'+
80 ' throw new Test262Error("#25: TypeError === null");\n'+
81 '}\n'+
82
83 '//CHECK#26\n'+
84 'if ( URIError === null ) {\n'+
85 ' throw new Test262Error("#26: URIError === null");\n'+
86 '}\n'+
87 ';\n';
88
89 eval(evalStr);
90
91 reportCompare(0, 0);