js/src/tests/test262/ch12/12.6/12.6.4/S12.6.4_A5.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement"
     6  *
     7  * @path ch12/12.6/12.6.4/S12.6.4_A5.js
     8  * @description Using hierarchical Object as an Expression is appropriate. The depth is two
     9  */
    11 __hash__map={a:{aa:1,ab:2,ac:3,ad:4},b:{ba:1,bb:2,bc:3,bd:4},c:{ca:1,cb:2,cc:3,cd:4},d:{da:1,db:2,dc:3,dd:4}};
    13 __arr = "";
    15 for(__key in __hash__map){
    16     for (__ind in __hash__map[__key]){
    17         __arr+=("" + __ind + __hash__map[__key][__ind]);
    18     }
    19 }
    21 if(!(
    22 (__arr.indexOf("aa1")!==-1)&
    23 (__arr.indexOf("ab2")!==-1)&
    24 (__arr.indexOf("ac3")!==-1)&
    25 (__arr.indexOf("ad4")!==-1)&
    26 (__arr.indexOf("ba1")!==-1)&
    27 (__arr.indexOf("bb2")!==-1)&
    28 (__arr.indexOf("bc3")!==-1)&
    29 (__arr.indexOf("bd4")!==-1)&
    30 (__arr.indexOf("ca1")!==-1)&
    31 (__arr.indexOf("cb2")!==-1)&
    32 (__arr.indexOf("cc3")!==-1)&
    33 (__arr.indexOf("cd4")!==-1)&
    34 (__arr.indexOf("da1")!==-1)&
    35 (__arr.indexOf("db2")!==-1)&
    36 (__arr.indexOf("dc3")!==-1)&
    37 (__arr.indexOf("dd4")!==-1)
    38 )) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');

mercurial