js/src/tests/js1_5/Regress/regress-193418.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /*
     7  *
     8  * Date:    17 February 2003
     9  * SUMMARY: Testing empty blocks
    10  *
    11  * See http://bugzilla.mozilla.org/show_bug.cgi?id=193418
    12  *
    13  */
    14 //-----------------------------------------------------------------------------
    15 var UBound = 0;
    16 var BUGNUMBER = 193418;
    17 var summary = 'Testing empty blocks';
    18 var status = '';
    19 var statusitems = [];
    20 var actual = '';
    21 var actualvalues = [];
    22 var expect= '';
    23 var expectedvalues = [];
    26 function f()
    27 {
    28   while (0)
    29   {
    30     {  }
    31   }
    32   actual = true;
    33 }
    36 status = inSection(1);
    37 f();  // sets |actual|
    38 expect = true;
    39 addThis();
    43 //-----------------------------------------------------------------------------
    44 test();
    45 //-----------------------------------------------------------------------------
    49 function addThis()
    50 {
    51   statusitems[UBound] = status;
    52   actualvalues[UBound] = actual;
    53   expectedvalues[UBound] = expect;
    54   UBound++;
    55 }
    58 function test()
    59 {
    60   enterFunc('test');
    61   printBugNumber(BUGNUMBER);
    62   printStatus(summary);
    64   for (var i=0; i<UBound; i++)
    65   {
    66     reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
    67   }
    69   exitFunc ('test');
    70 }

mercurial