regress-83532-001.js (1062B)
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 * Date: 01 June 2001 8 * 9 * SUMMARY: Testing that we don't crash on switch case -1... 10 * See http://bugzilla.mozilla.org/show_bug.cgi?id=83532 11 * 12 */ 13 //----------------------------------------------------------------------------- 14 var BUGNUMBER = 83532; 15 var summary = "Testing that we don't crash on switch case -1"; 16 17 //----------------------------------------------------------------------------- 18 test(); 19 //----------------------------------------------------------------------------- 20 21 function test() 22 { 23 printBugNumber(BUGNUMBER); 24 printStatus (summary); 25 26 // Just testing that we don't crash on these - 27 function f () {switch(1) {case -1:}} 28 function g(){switch(1){case (-1):}} 29 var h = function() {switch(1) {case -1:}} 30 f(); 31 g(); 32 h(); 33 reportCompare('No Crash', 'No Crash', ''); 34 }