Debian Codegraph @

rhino/testsrc/tests/js1_5/Scope/regress-154693.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: 26 Nov 2002
9 * SUMMARY: Testing scope
10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=154693
11 *
12 */
13 //-----------------------------------------------------------------------------
14 var gTestfile = 'regress-154693.js';
15 var UBound = 0;
16 var BUGNUMBER = 154693;
17 var summary = 'Testing scope';
18 var status = '';
19 var statusitems = [];
20 var actual = '';
21 var actualvalues = [];
22 var expect= '';
23 var expectedvalues = [];
24
25
26 function f()
27 {
28 function nested() {}
29 return nested;
30 }
31 var f1 = f();
32 var f2 = f();
33
34 status = inSection(1);
35 actual = (f1 != f2);
36 expect = true;
37 addThis();
38
39
40
41 //-----------------------------------------------------------------------------
42 test();
43 //-----------------------------------------------------------------------------
44
45
46
47 function addThis()
48 {
49 statusitems[UBound] = status;
50 actualvalues[UBound] = actual;
51 expectedvalues[UBound] = expect;
52 UBound++;
53 }
54
55
56 function test()
57 {
58 enterFunc('test');
59 printBugNumber(BUGNUMBER);
60 printStatus(summary);
61
62 for (var i=0; i<UBound; i++)
63 {
64 reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);
65 }
66
67 exitFunc ('test');
68 }