js/src/tests/test262/ch12/12.6/12.6.4/S12.6.4_A3.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_A3.js
     8  * @description Using an array as an Expression is appropriate. Here Expression is an array of numbers. Eval is used
     9  */
    11 __str="";
    13 __evaluated = eval("for(ind in (arr=[2,1,4,3]))__str+=arr[ind]");
    15 //////////////////////////////////////////////////////////////////////////////
    16 //CHECK#1
    17 if (__evaluated !== __str) {
    18 	$ERROR('#1: __evaluated === __str. Actual:  __evaluated ==='+ __evaluated  );
    19 }
    20 //
    21 //////////////////////////////////////////////////////////////////////////////
    23 //////////////////////////////////////////////////////////////////////////////
    24 //CHECK#2
    25 if (!( (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1) )) {
    26 	$ERROR('#2: (__str.indexOf("2")!==-1)&&(__str.indexOf("1")!==-1)&&(__str.indexOf("4")!==-1)&&(__str.indexOf("3")!==-1)');
    27 }
    28 //
    29 //////////////////////////////////////////////////////////////////////////////

mercurial