]>
Commit | Line | Data |
---|---|---|
b37bf2e1 A |
1 | /** |
2 | File Name: expression-009 | |
3 | Corresponds to: ecma/Expressions/11.2.2-4-n.js | |
4 | ECMA Section: 11.2.2. The new operator | |
5 | Description: | |
6 | Author: christine@netscape.com | |
7 | Date: 12 november 1997 | |
8 | */ | |
9 | var SECTION = "expression-009"; | |
10 | var VERSION = "JS1_4"; | |
11 | var TITLE = "The new operator"; | |
12 | ||
13 | startTest(); | |
14 | writeHeaderToLog( SECTION + " "+ TITLE); | |
15 | ||
16 | var tc = 0; | |
17 | var testcases = new Array(); | |
18 | ||
19 | var STRING = ""; | |
20 | ||
21 | var result = "Failed"; | |
22 | var exception = "No exception thrown"; | |
23 | var expect = "Passed"; | |
24 | ||
25 | try { | |
26 | result = new STRING(); | |
27 | } catch ( e ) { | |
28 | result = expect; | |
29 | exception = e.toString(); | |
30 | } | |
31 | ||
32 | testcases[tc++] = new TestCase( | |
33 | SECTION, | |
34 | "STRING = ''; result = new STRING()" + | |
35 | " (threw " + exception +")", | |
36 | expect, | |
37 | result ); | |
38 | ||
39 | test(); |