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