Wed, 31 Dec 2014 07:53:36 +0100
Correct small whitespace inconsistency, lost while renaming variables.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * A property is created with name length with property
6 * attributes { DontEnum } and no others
7 *
8 * @path ch10/10.6/S10.6_A5_T2.js
9 * @description Checking if enumerating the arguments.length property fails
10 */
12 //CHECK#1
13 function f1(){
14 for(var x in arguments){
15 if (x === "length"){
16 return false;
17 }
18 }
19 return true;
20 }
22 try{
23 if(!f1()){
24 $ERROR("#1: A property length don't have attribute { DontEnum }");
25 }
26 }
27 catch(e){
28 $ERROR("#1: arguments object don't exists");
29 }
31 //CHECK#2
32 var f2 = function(){
33 for(var x in arguments){
34 if (x === "length"){
35 return false;
36 }
37 }
38 return true;
39 }
41 try{
42 if(!f2()){
43 $ERROR("#2: A property length don't have attribute { DontEnum }");
44 }
45 }
46 catch(e){
47 $ERROR("#2: arguments object don't exists");
48 }