Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-193418.js

raw symbols SCIP
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/. */
5
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 gTestfile = 'regress-193418.js';
16 var UBound = 0;
17 var BUGNUMBER = 193418;
18 var summary = 'Testing empty blocks';
19 var status = '';
20 var statusitems = [];
21 var actual = '';
22 var actualvalues = [];
23 var expect= '';
24 var expectedvalues = [];
25
26
27 function f()
28 {
29 while (0)
30 {
31 { }
32 }
33 actual = true;
34 }
35
36
37 status = inSection(1);
38 f(); // sets |actual|
39 expect = true;
40 addThis();
41
42
43
44 //-----------------------------------------------------------------------------
45 test();
46 //-----------------------------------------------------------------------------
47
48
49
50 function addThis()
51 {
52 statusitems[UBound] = status;
53 actualvalues[UBound] = actual;
54 expectedvalues[UBound] = expect;
55 UBound++;
56 }
57
58
59 function test()
60 {
61 enterFunc('test');
62 printBugNumber(BUGNUMBER);
63 printStatus(summary);
64
65 for (var i=0; i<UBound; i++)
66 {
67 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
68 }
69
70 exitFunc ('test');
71 }