|
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 * Arguments property of activation object contains real params to be passed |
|
6 * |
|
7 * @path ch13/13.0/S13_A8_T1.js |
|
8 * @description Creating a function declared with "function __func(param1, param2, param3)" and using arguments.length property in order to perform the test |
|
9 */ |
|
10 |
|
11 function __func(param1, param2, param3) { |
|
12 return arguments.length; |
|
13 } |
|
14 |
|
15 ////////////////////////////////////////////////////////////////////////////// |
|
16 //CHECK#1 |
|
17 if (__func('A') !== 1) { |
|
18 $ERROR('#1: __func(\'A\') === 1. Actual: __func(\'A\') ==='+__func('A')); |
|
19 } |
|
20 // |
|
21 ////////////////////////////////////////////////////////////////////////////// |
|
22 |
|
23 ////////////////////////////////////////////////////////////////////////////// |
|
24 //CHECK#2 |
|
25 if (__func('A', 'B', 1, 2,__func) !== 5) { |
|
26 $ERROR('#2: __func(\'A\', \'B\', 1, 2,__func) === 5. Actual: __func(\'A\', \'B\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func)); |
|
27 } |
|
28 // |
|
29 ////////////////////////////////////////////////////////////////////////////// |
|
30 |
|
31 |
|
32 |
|
33 |