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_A5.1_T2.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 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 + * For each VariableDeclaration or VariableDeclarationNoIn in the 1.9 + * code, create a property of the variable object whose name is the Identifier 1.10 + * in the VariableDeclaration or VariableDeclarationNoIn, whose value is 1.11 + * undefined and whose attributes are determined by the type of code 1.12 + * 1.13 + * @path ch10/10.2/10.2.1/S10.2.1_A5.1_T2.js 1.14 + * @description Checking existence of the variable object property with formal parameter 1.15 + */ 1.16 + 1.17 +//CHECK#1 1.18 +function f1(x){ 1.19 + var x; 1.20 + 1.21 + return typeof x; 1.22 +} 1.23 + 1.24 +if(!(f1() === "undefined")){ 1.25 + $PRINT('#1: f1(1) === "undefined"'); 1.26 +} 1.27 + 1.28 +//CHECK#2 1.29 +function f2(x){ 1.30 + var x; 1.31 + 1.32 + return x; 1.33 +} 1.34 + 1.35 +if(!(f2() === undefined)){ 1.36 + $PRINT('#1: f2(1) === undefined'); 1.37 +} 1.38 +