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: * Primitive types are passed by value michael@0: * michael@0: * @path ch13/13.2/S13.2.1_A6_T2.js michael@0: * @description Declaring a function with "__func = function(arg1, arg2)" michael@0: */ michael@0: michael@0: __func = function(arg1, arg2){ michael@0: arg1++; michael@0: arg2+="BA"; michael@0: }; michael@0: michael@0: var x=1; michael@0: y=2; michael@0: var a="AB" michael@0: b="SAM"; michael@0: michael@0: __func(x,a); michael@0: __func(y,b); michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: if (x!==1 || y!==2 || a!=="AB" || b!=="SAM") { michael@0: $ERROR('#1: x === 1 and y === 2 and a === "AB" and b === "SAM". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: