S10.6_A5_T3.js (858B)
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 A property is created with name length with property 7 attributes { DontEnum } and no others 8 es5id: 10.6_A5_T3 9 description: Checking if deleting arguments.length property fails 10 ---*/ 11 12 //CHECK#1 13 function f1(){ 14 return (delete arguments.length); 15 } 16 17 try{ 18 if(!f1()){ 19 throw new Test262Error("#1: A property length have attribute { DontDelete }"); 20 } 21 } 22 catch(e){ 23 throw new Test262Error("#1: arguments object don't exists"); 24 } 25 26 //CHECK#2 27 var f2 = function(){ 28 return (delete arguments.length); 29 } 30 31 try{ 32 if(!f2()){ 33 throw new Test262Error("#2: A property length have attribute { DontDelete }"); 34 } 35 } 36 catch(e){ 37 throw new Test262Error("#2: arguments object don't exists"); 38 } 39 40 reportCompare(0, 0);