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/. */
9
* SUMMARY: Regression test for Bugzilla bug 74474
10
* "switch() misbehaves with duplicated labels"
12
* See http://bugzilla.mozilla.org/show_bug.cgi?id=74474
13
* See ECMA3 Section 12.11, "The switch Statement"
15
//-----------------------------------------------------------------------------
17
var BUGNUMBER = 74474;
18
var summary = 'Test of switch statement that overflows the stack-allocated bitmap';
19
var status = '(One duplicated label [8998])';
20
var statusitems = [ ];
22
var actualvalues = [ ];
24
var expectedvalues = [ ];
9029
case 8998: // DUPLICATE LABEL
9039
//---------------------------------------------------------------------------------
9041
//---------------------------------------------------------------------------------
9046
statusitems[UBound] = status;
9047
actualvalues[UBound] = actual;
9048
expectedvalues[UBound] = expect;
9056
printBugNumber(BUGNUMBER);
9057
printStatus (summary);
9059
for (var i = 0; i < UBound; i++)
9061
reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);