~ubuntu-branches/ubuntu/saucy/mozjs17/saucy

« back to all changes in this revision

Viewing changes to js/src/tests/ecma_3/Exceptions/regress-58946.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 
2
 *
 
3
 * This Source Code Form is subject to the terms of the Mozilla Public
 
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
6
 
 
7
//-------------------------------------------------------------------------------------------------
 
8
var BUGNUMBER = '58946';
 
9
var stat =  'Testing a return statement inside a catch statement inside a function';
 
10
 
 
11
test();
 
12
 
 
13
function test() {
 
14
  enterFunc ("test");
 
15
  printBugNumber(BUGNUMBER);
 
16
  printStatus (stat);
 
17
 
 
18
  expect = 'PASS';
 
19
 
 
20
  function f()
 
21
  {
 
22
    try
 
23
    {
 
24
      throw 'PASS';
 
25
    }
 
26
    catch(e)
 
27
    {
 
28
      return e;
 
29
    }
 
30
  }
 
31
 
 
32
  actual = f();
 
33
 
 
34
  reportCompare(expect, actual, stat);
 
35
 
 
36
  exitFunc ("test");
 
37
}