Debian Codegraph @

rhino/testsrc/tests/ecma_2/Exceptions/expression-006.js

raw symbols SCIP
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/. */
5
6 gTestfile = 'expression-006.js';
7
8 /**
9 File Name: expression-006.js
10 Corresponds to: 11.2.2-1-n.js
11 ECMA Section: 11.2.2. The new operator
12 Description:
13
14 http://scopus/bugsplat/show_bug.cgi?id=327765
15
16 Author: [email protected]
17 Date: 12 november 1997
18 */
19 var SECTION = "expression-006.js";
20 var VERSION = "JS1_4";
21 var TITLE = "The new operator";
22 var BUGNUMBER="327765";
23
24 startTest();
25 writeHeaderToLog( SECTION + " "+ TITLE);
26
27 var result = "Failed";
28 var exception = "No exception thrown";
29 var expect = "Passed";
30
31 try {
32 var OBJECT = new Object();
33 result = new OBJECT();
34 } catch ( e ) {
35 result = expect;
36 exception = e.toString();
37 }
38
39 new TestCase(
40 SECTION,
41 "OBJECT = new Object; result = new OBJECT()" +
42 " (threw " + exception +")",
43 expect,
44 result );
45
46 test();
47