Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/global/S10.2.3_A2.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: Global object properties have attributes { DontEnum }
6 es5id: 10.2.3_A2.3_T3
7 description: Global execution context - Constructor Properties
8 ---*/
9
10 var evalStr =
11 '//CHECK#1\n'+
12 'for (var x in this) {\n'+
13 ' if ( x === \'Object\' ) {\n'+
14 ' $ERROR("#1: \'Object\' have attribute DontEnum");\n'+
15 ' } else if ( x === \'Function\') {\n'+
16 ' $ERROR("#1: \'Function\' have attribute DontEnum");\n'+
17 ' } else if ( x === \'String\' ) {\n'+
18 ' $ERROR("#1: \'String\' have attribute DontEnum");\n'+
19 ' } else if ( x === \'Number\' ) {\n'+
20 ' $ERROR("#1: \'Number\' have attribute DontEnum");\n'+
21 ' } else if ( x === \'Array\' ) {\n'+
22 ' $ERROR("#1: \'Array\' have attribute DontEnum");\n'+
23 ' } else if ( x === \'Boolean\' ) {\n'+
24 ' $ERROR("#1: \'Boolean\' have attribute DontEnum");\n'+
25 ' } else if ( x === \'Date\' ) {\n'+
26 ' $ERROR("#1: \'Date\' have attribute DontEnum");\n'+
27 ' } else if ( x === \'RegExp\' ) {\n'+
28 ' $ERROR("#1: \'RegExp\' have attribute DontEnum");\n'+
29 ' } else if ( x === \'Error\' ) {\n'+
30 ' $ERROR("#1: \'Error\' have attribute DontEnum");\n'+
31 ' } else if ( x === \'EvalError\' ) {\n'+
32 ' $ERROR("#1: \'EvalError\' have attribute DontEnum");\n'+
33 ' } else if ( x === \'RangeError\' ) {\n'+
34 ' $ERROR("#1: \'RangeError\' have attribute DontEnum");\n'+
35 ' } else if ( x === \'ReferenceError\' ) {\n'+
36 ' $ERROR("#1: \'ReferenceError\' have attribute DontEnum");\n'+
37 ' } else if ( x === \'SyntaxError\' ) {\n'+
38 ' $ERROR("#1: \'SyntaxError\' have attribute DontEnum");\n'+
39 ' } else if ( x === \'TypeError\' ) {\n'+
40 ' $ERROR("#1: \'TypeError\' have attribute DontEnum");\n'+
41 ' } else if ( x === \'URIError\' ) {\n'+
42 ' $ERROR("#1: \'URIError\' have attribute DontEnum");\n'+
43 ' }\n'+
44 '}\n';
45
46 eval(evalStr);