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_T3.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 "__obj={}" michael@0: */ michael@0: michael@0: function __func(){ michael@0: arguments[0]["PI"]=3.14; 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.PI !== 3.14) { michael@0: $ERROR('#1: __obj.PI === 3.14. Actual: __obj.PI ==='+__obj.PI); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: