~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/JavaScriptCore/tests/mozilla/ecma_3/Statements/regress-83532-001.js

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
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/
 
6
*
 
7
* Software distributed under the License is distributed on an "AS
 
8
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
9
* implied. See the License for the specific language governing
 
10
* rights and limitations under the License.
 
11
*
 
12
* The Original Code is mozilla.org code.
 
13
*
 
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
 
17
* Rights Reserved.
 
18
*
 
19
* Contributor(s): pschwartau@netscape.com
 
20
* Date: 01 June 2001
 
21
*
 
22
* SUMMARY: Testing that we don't crash on switch case -1...
 
23
* See http://bugzilla.mozilla.org/show_bug.cgi?id=83532
 
24
*
 
25
*/
 
26
//-------------------------------------------------------------------------------------------------
 
27
var bug = 83532;
 
28
var summary = "Testing that we don't crash on switch case -1";
 
29
 
 
30
//-------------------------------------------------------------------------------------------------
 
31
test();
 
32
//-------------------------------------------------------------------------------------------------
 
33
 
 
34
function test()
 
35
{
 
36
  enterFunc ('test');
 
37
  printBugNumber (bug);
 
38
  printStatus (summary);
 
39
 
 
40
  // Just testing that we don't crash on these -
 
41
  function f () {switch(1) {case -1:}}
 
42
  function g(){switch(1){case (-1):}}
 
43
  var h = function() {switch(1) {case -1:}}
 
44
  f();
 
45
  g();
 
46
  h();
 
47
  exitFunc ('test');
 
48
}