js/src/tests/test262/ch12/12.6/12.6.4/S12.6.4_A5.1.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.

michael@0 1 // Copyright 2009 the Sputnik authors. All rights reserved.
michael@0 2 // This code is governed by the BSD license found in the LICENSE file.
michael@0 3
michael@0 4 /**
michael@0 5 * The production IterationStatement: "for (var VariableDeclarationNoIn in Expression) Statement"
michael@0 6 *
michael@0 7 * @path ch12/12.6/12.6.4/S12.6.4_A5.1.js
michael@0 8 * @description Using hierarchical Object as an Expression is appropriate. The depth is two
michael@0 9 */
michael@0 10
michael@0 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}};
michael@0 12
michael@0 13 __arr = "";
michael@0 14
michael@0 15 for(var __key in __hash__map){
michael@0 16 for (var __ind in __hash__map[__key]){
michael@0 17 __arr+=("" + __ind + __hash__map[__key][__ind]);
michael@0 18 }
michael@0 19 }
michael@0 20
michael@0 21 if(!(
michael@0 22 (__arr.indexOf("aa1")!==-1)&
michael@0 23 (__arr.indexOf("ab2")!==-1)&
michael@0 24 (__arr.indexOf("ac3")!==-1)&
michael@0 25 (__arr.indexOf("ad4")!==-1)&
michael@0 26 (__arr.indexOf("ba1")!==-1)&
michael@0 27 (__arr.indexOf("bb2")!==-1)&
michael@0 28 (__arr.indexOf("bc3")!==-1)&
michael@0 29 (__arr.indexOf("bd4")!==-1)&
michael@0 30 (__arr.indexOf("ca1")!==-1)&
michael@0 31 (__arr.indexOf("cb2")!==-1)&
michael@0 32 (__arr.indexOf("cc3")!==-1)&
michael@0 33 (__arr.indexOf("cd4")!==-1)&
michael@0 34 (__arr.indexOf("da1")!==-1)&
michael@0 35 (__arr.indexOf("db2")!==-1)&
michael@0 36 (__arr.indexOf("dc3")!==-1)&
michael@0 37 (__arr.indexOf("dd4")!==-1)
michael@0 38 )) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');
michael@0 39
michael@0 40
michael@0 41
michael@0 42

mercurial