]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_3/Statements/regress-74474-002.js
2 * The contents of this file are subject to the Netscape Public
3 * License Version 1.1 (the "License"); you may not use this file
4 * except in compliance with the License. You may obtain a copy of
5 * the License at http://www.mozilla.org/NPL/
7 * Software distributed under the License is distributed on an "AS IS"
8 * basis, WITHOUT WARRANTY OF ANY KIND, either expressed
9 * or implied. See the License for the specific language governing
10 * rights and limitations under the License.
12 * The Original Code is mozilla.org code.
14 * The Initial Developer of the Original Code is Netscape
15 * Communications Corporation. Portions created by Netscape are
16 * Copyright (C) 1998 Netscape Communications Corporation. All
19 * Contributor(s): brendan@mozilla.org, pschwartau@netscape.com
22 * SUMMARY: Regression test for Bugzilla bug 74474
23 * "switch() misbehaves with duplicated labels"
25 * See http://bugzilla.mozilla.org/show_bug.cgi?id=74474
26 * See ECMA3 Section 12.11, "The switch Statement"
28 //-------------------------------------------------------------------------------------------------
31 var summary
= 'Test of switch statement that overflows the stack-allocated bitmap';
32 var status
= '(No duplicated labels)';
33 var statusitems
= [ ];
35 var actualvalues
= [ ];
37 var expectedvalues
= [ ];
9050 //---------------------------------------------------------------------------------
9052 //---------------------------------------------------------------------------------
9057 statusitems
[UBound
] = status
;
9058 actualvalues
[UBound
] = actual
;
9059 expectedvalues
[UBound
] = expect
;
9067 printBugNumber (bug
);
9068 printStatus (summary
);
9070 for (var i
= 0; i
< UBound
; i
++)
9072 reportCompare(expectedvalues
[i
], actualvalues
[i
], statusitems
[i
]);