js/src/tests/test262/ch12/12.8/S12.8_A4_T3.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  * When "break Identifier" is evaluated, (break, empty, Identifier) is returned
     6  *
     7  * @path ch12/12.8/S12.8_A4_T3.js
     8  * @description Using embedded and labeled loops, breaking to outer loop
     9  */
    11 LABEL_OUT : var x=0, y=0, xx=0, yy=0;
    12 (function(){
    13 LABEL_DO_LOOP : do {
    14     LABEL_IN : x++;
    15     if(x===10)return;
    16     LABEL_NESTED_LOOP : do {
    17         LABEL_IN_NESTED : xx++;
    18         if(xx===10)return;
    19         break LABEL_DO_LOOP;
    20         LABEL_IN_NESTED_2 : yy++;
    21     } while (0);
    23     LABEL_IN_2 : y++;
    25     function IN_DO_FUNC(){}
    26 } while(0);
    28 LABEL_ANOTHER_LOOP : do {
    29     ;
    30 } while(0);
    32 function OUT_FUNC(){}
    33 })();
    34 //////////////////////////////////////////////////////////////////////////////
    35 //CHECK#1
    36 if ((x!==1)&&(y!==0)&&(xx!==1)&(yy!==0)) {
    37 	$ERROR('#1: x === 1 and y === 0 and xx === 1 and yy === 0. Actual:  x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );
    38 }
    39 //
    40 //////////////////////////////////////////////////////////////////////////////

mercurial