michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * The activation object is initialised with a property with name arguments and attributes {DontDelete} michael@0: * michael@0: * @path ch10/10.1/S10.1.6_A1_T2.js michael@0: * @description Checking funtion which returns property "arguments" michael@0: */ michael@0: michael@0: var ARG_STRING = "value of the argument property"; michael@0: michael@0: function f1() { michael@0: this.constructor.prototype.arguments = ARG_STRING; michael@0: return arguments; michael@0: } michael@0: michael@0: //CHECK#1 michael@0: if ((new f1(1,2,3,4,5)).length !== 5) michael@0: $ERROR('#1: (new f1(1,2,3,4,5)).length===5, where f1 returns "arguments" that is set to "'+ ARG_STRING + '"'); michael@0: michael@0: //CHECK#2 michael@0: if ((new f1(1,2,3,4,5))[3] !== 4) michael@0: $ERROR('#2: (new f1(1,2,3,4,5))[3]===4, where f1 returns "arguments" that is set to "'+ ARG_STRING + '"'); michael@0: michael@0: //CHECK#3 michael@0: var x = new f1(1,2,3,4,5); michael@0: if (delete x[3] !== true) michael@0: $ERROR('#3.1: Function parameters have attribute {DontDelete}'); michael@0: michael@0: if (x[3] === 4) michael@0: $ERROR('#3.2: Function parameters have attribute {DontDelete}'); michael@0: