js/src/tests/test262/ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js

changeset 0
6474c204b198
     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.2_T1.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     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 there is already a property of the variable object with the
     1.9 + * name of a declared variable, the value of the property and its attributes
    1.10 + * are not changed
    1.11 + *
    1.12 + * @path ch10/10.2/10.2.1/S10.2.1_A5.2_T1.js
    1.13 + * @description Checking existence of the variable object property with formal parameter
    1.14 + */
    1.15 +
    1.16 +//CHECK#1
    1.17 +function f1(x){
    1.18 +  var x;
    1.19 +  
    1.20 +  return typeof x;
    1.21 +}
    1.22 +
    1.23 +if(!(f1(1) === "number")){
    1.24 +  $PRINT('#1: f1(1) === "number"');
    1.25 +}
    1.26 +
    1.27 +//CHECK#2
    1.28 +function f2(x){
    1.29 +  var x;
    1.30 +  
    1.31 +  return x;
    1.32 +}
    1.33 +
    1.34 +if(!(f2(1) === 1)){
    1.35 +  $PRINT('#1: f2(1) === 1');
    1.36 +}
    1.37 +

mercurial