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_T1.js michael@0: * @description Adding new number property to a function argument within the function body, michael@0: * where explicit argument is an object defined with "var __obj={}" michael@0: */ michael@0: michael@0: function __func(__arg){ michael@0: __arg.foo=7; 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.foo !== 7) { michael@0: $ERROR('#1: __obj.foo === 7. Actual: __obj.foo ==='+__obj.foo); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: