1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A1.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +// Copyright 2009 the Sputnik authors. All rights reserved. 1.5 +// This code is governed by the BSD license found in the LICENSE file. 1.6 + 1.7 +/** 1.8 + * If the caller supplies fewer parameter values than there are 1.9 + * formal parameters, the extra formal parameters have value undefined 1.10 + * 1.11 + * @path ch10/10.2/10.2.1/S10.2.1_A1.js 1.12 + * @description Calling function excluding a few parameters 1.13 + */ 1.14 + 1.15 +//CHECK#1 1.16 +function f1(a, b){ 1.17 + return (b === undefined); 1.18 +} 1.19 +if(!(f1(1, 2) === false)){ 1.20 + $ERROR('#1: f1(1, 2) === false'); 1.21 +} else if(!(f1(1) === true)){ 1.22 + $ERROR('#1: f1(1) === true'); 1.23 +} 1.24 + 1.25 +//CHECK#2 1.26 +function f2(a, b, c){ 1.27 + return (b === undefined) && (c === undefined); 1.28 +} 1.29 +if(!(f2(1) === true)){ 1.30 + $ERROR('#2: f2(1, 2) === true'); 1.31 +} 1.32 +