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: * Objects as arguments are passed by reference michael@0: * michael@0: * @path ch13/13.2/S13.2.1_A4_T4.js michael@0: * @description Adding new number property to a function argument within the function body, michael@0: * where array element "arguments[0]" is an object defined with "var __obj={}" michael@0: */ michael@0: michael@0: function __func(){ michael@0: arguments[0]["E"]=2.74; michael@0: } michael@0: michael@0: var __obj={}; michael@0: michael@0: __func(__obj); michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (__obj.E !== 2.74) { michael@0: $ERROR('#1: __obj.E === 2.74. Actual: __obj.E ==='+__obj.E); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: