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