js/src/tests/test262/ch12/12.11/S12.11_A4_T1.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     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  * Embedded syntax constructions of switch statement
     6  *
     7  * @path ch12/12.11/S12.11_A4_T1.js
     8  * @description Nesting one "switch" statement into StatementList of the other's
     9  */
    11 function SwitchTest(value){
    12   var result = 0;
    14   switch(value) {
    15     case 0:
    16       switch(value) {
    17         case 0:
    18          result += 3;
    19         break;
    20         default:
    21           result += 32;
    22           break;
    23         }
    24       result *= 2;
    25       break;
    26       result=3;
    27     default:
    28       result += 32;
    29       break;
    30   }
    31   return result;
    32 }
    34 var x = SwitchTest(0);
    35 if(x!==6) $ERROR("#1: SwitchTest(0) === 6. Actual:  SwitchTest(0) ==="+ SwitchTest(0)  );

mercurial