Debian Codegraph @

rhino/testsrc/tests/js1_5/Regress/regress-469044.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 var gTestfile = 'regress-469044.js';
7 //-----------------------------------------------------------------------------
8 var BUGNUMBER = 469044;
9 var summary = 'type unstable globals';
10 var actual = '';
11 var expect = '';
12
13
14 //-----------------------------------------------------------------------------
15 test();
16 //-----------------------------------------------------------------------------
17
18 function test()
19 {
20 enterFunc ('test');
21 printBugNumber(BUGNUMBER);
22 printStatus (summary);
23
24 expect = '---000---000';
25 actual = '';
26
27 for (var i = 0; i < 2; ++i) {
28 for (var e = 0; e < 2; ++e) {
29 }
30 var c = void 0;
31 print(actual += "---");
32 for (var a = 0; a < 3; ++a) {
33 c <<= c;
34 print(actual += "" + c);
35 }
36 }
37 reportCompare(expect, actual, summary + ': 1');
38
39 expect = '00000000';
40 actual = '';
41
42 print("");
43 for (var i = 0; i < 2; ++i) {
44 for (var e = 0; e < 2; ++e) {
45 }
46 var c = void 0;
47 for (var a = 0; a < 3; ++a) {
48 c <<= c;
49 print(actual += "" + c);
50 }
51 print(actual += c);
52 }
53 reportCompare(expect, actual, summary + ': 2');
54
55 actual = '';
56 print("");
57
58 for (var i = 0; i < 2; ++i) {
59 for (var e = 0; e < 2; ++e) {
60 }
61 var c = void 0;
62 for (var a = 0; a < 3; ++a) {
63 c <<= c;
64 Math;
65 print(actual += "" + c);
66 }
67 print(actual += c);
68 }
69 reportCompare(expect, actual, summary + ': 3');
70
71 exitFunc ('test');
72 }