Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/global/S10.2.3_A2.3_T2.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_T2
7 description: Global execution context - Function Properties
8 ---*/
9
10 var evalStr =
11 '//CHECK#1\n'+
12 'for (var x in this) {\n'+
13 ' if ( x === \'eval\' ) {\n'+
14 ' $ERROR("#1: \'eval\' have attribute DontEnum");\n'+
15 ' } else if ( x === \'parseInt\' ) {\n'+
16 ' $ERROR("#1: \'parseInt\' have attribute DontEnum");\n'+
17 ' } else if ( x === \'parseFloat\' ) {\n'+
18 ' $ERROR("#1: \'parseFloat\' have attribute DontEnum");\n'+
19 ' } else if ( x === \'isNaN\' ) {\n'+
20 ' $ERROR("#1: \'isNaN\' have attribute DontEnum");\n'+
21 ' } else if ( x === \'isFinite\' ) {\n'+
22 ' $ERROR("#1: \'isFinite\' have attribute DontEnum");\n'+
23 ' } else if ( x === \'decodeURI\' ) {\n'+
24 ' $ERROR("#1: \'decodeURI\' have attribute DontEnum");\n'+
25 ' } else if ( x === \'decodeURIComponent\' ) {\n'+
26 ' $ERROR("#1: \'decodeURIComponent\' have attribute DontEnum");\n'+
27 ' } else if ( x === \'encodeURI\' ) {\n'+
28 ' $ERROR("#1: \'encodeURI\' have attribute DontEnum");\n'+
29 ' } else if ( x === \'encodeURIComponent\' ) {\n'+
30 ' $ERROR("#1: \'encodeURIComponent\' have attribute DontEnum");\n'+
31 ' }\n'+
32 '}\n';
33
34 eval(evalStr);