js/src/tests/test262/ch13/13.2/S13.2.1_A4_T1.js

branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
equal deleted inserted replaced
-1:000000000000 0:86c4760edae1
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 * Objects as arguments are passed by reference
6 *
7 * @path ch13/13.2/S13.2.1_A4_T1.js
8 * @description Adding new number property to a function argument within the function body,
9 * where explicit argument is an object defined with "var __obj={}"
10 */
11
12 function __func(__arg){
13 __arg.foo=7;
14 }
15
16 var __obj={};
17
18 __func(__obj);
19
20 //////////////////////////////////////////////////////////////////////////////
21 //CHECK#1
22 if (__obj.foo !== 7) {
23 $ERROR('#1: __obj.foo === 7. Actual: __obj.foo ==='+__obj.foo);
24 }
25 //
26 //////////////////////////////////////////////////////////////////////////////
27

mercurial