* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / Microsoft.JScript / Test / Mozilla / ecma_2 / Exceptions / expression-009.js
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /**
3    File Name:          expression-009
4    Corresponds to:     ecma/Expressions/11.2.2-4-n.js
5    ECMA Section:       11.2.2. The new operator
6    Description:
7    Author:             christine@netscape.com
8    Date:               12 november 1997
9 */
10 var SECTION = "expression-009";
11 var VERSION = "JS1_4";
12 var TITLE   = "The new operator";
13
14 startTest();
15 writeHeaderToLog( SECTION + " "+ TITLE);
16
17 var STRING = "";
18
19 var result = "Failed";
20 var exception = "No exception thrown";
21 var expect = "Passed";
22
23 try {
24   result = new STRING();
25 } catch ( e ) {
26   result = expect;
27   exception = e.toString();
28 }
29
30 new TestCase(
31   SECTION,
32   "STRING = ''; result = new STRING()" +
33   " (threw " + exception +")",
34   expect,
35   result );
36
37 test();