S13.2.1_A4_T4.js (775B)
1 // Copyright 2009 the Sputnik authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 info: Objects as arguments are passed by reference 6 es5id: 13.2.1_A4_T4 7 description: > 8 Adding new number property to a function argument within the 9 function body, where array element "arguments[0]" is an object 10 defined with "var __obj={}" 11 ---*/ 12 13 function __func(){ 14 arguments[0]["E"]=2.74; 15 } 16 17 var __obj={}; 18 19 __func(__obj); 20 21 ////////////////////////////////////////////////////////////////////////////// 22 //CHECK#1 23 if (__obj.E !== 2.74) { 24 throw new Test262Error('#1: __obj.E === 2.74. Actual: __obj.E ==='+__obj.E); 25 } 26 // 27 ////////////////////////////////////////////////////////////////////////////// 28 29 reportCompare(0, 0);