1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/test262/ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +// Copyright 2009 the Sputnik authors. All rights reserved. 1.5 +// This code is governed by the BSD license found in the LICENSE file. 1.6 + 1.7 +/** 1.8 + * Global object properties have attributes { DontEnum } 1.9 + * 1.10 + * @path ch10/10.2/10.2.3/S10.2.3_A2.3_T3.js 1.11 + * @description Global execution context - Constructor Properties 1.12 + */ 1.13 + 1.14 +var evalStr = 1.15 +'//CHECK#1\n'+ 1.16 +'for (var x in this) {\n'+ 1.17 +' if ( x === \'Object\' ) {\n'+ 1.18 +' $ERROR("#1: \'Object\' have attribute DontEnum");\n'+ 1.19 +' } else if ( x === \'Function\') {\n'+ 1.20 +' $ERROR("#1: \'Function\' have attribute DontEnum");\n'+ 1.21 +' } else if ( x === \'String\' ) {\n'+ 1.22 +' $ERROR("#1: \'String\' have attribute DontEnum");\n'+ 1.23 +' } else if ( x === \'Number\' ) {\n'+ 1.24 +' $ERROR("#1: \'Number\' have attribute DontEnum");\n'+ 1.25 +' } else if ( x === \'Array\' ) {\n'+ 1.26 +' $ERROR("#1: \'Array\' have attribute DontEnum");\n'+ 1.27 +' } else if ( x === \'Boolean\' ) {\n'+ 1.28 +' $ERROR("#1: \'Boolean\' have attribute DontEnum");\n'+ 1.29 +' } else if ( x === \'Date\' ) {\n'+ 1.30 +' $ERROR("#1: \'Date\' have attribute DontEnum");\n'+ 1.31 +' } else if ( x === \'RegExp\' ) {\n'+ 1.32 +' $ERROR("#1: \'RegExp\' have attribute DontEnum");\n'+ 1.33 +' } else if ( x === \'Error\' ) {\n'+ 1.34 +' $ERROR("#1: \'Error\' have attribute DontEnum");\n'+ 1.35 +' } else if ( x === \'EvalError\' ) {\n'+ 1.36 +' $ERROR("#1: \'EvalError\' have attribute DontEnum");\n'+ 1.37 +' } else if ( x === \'RangeError\' ) {\n'+ 1.38 +' $ERROR("#1: \'RangeError\' have attribute DontEnum");\n'+ 1.39 +' } else if ( x === \'ReferenceError\' ) {\n'+ 1.40 +' $ERROR("#1: \'ReferenceError\' have attribute DontEnum");\n'+ 1.41 +' } else if ( x === \'SyntaxError\' ) {\n'+ 1.42 +' $ERROR("#1: \'SyntaxError\' have attribute DontEnum");\n'+ 1.43 +' } else if ( x === \'TypeError\' ) {\n'+ 1.44 +' $ERROR("#1: \'TypeError\' have attribute DontEnum");\n'+ 1.45 +' } else if ( x === \'URIError\' ) {\n'+ 1.46 +' $ERROR("#1: \'URIError\' have attribute DontEnum");\n'+ 1.47 +' }\n'+ 1.48 +'}\n'; 1.49 + 1.50 +eval(evalStr); 1.51 +