initial import
[vuplus_webkit] / Source / JavaScriptCore / tests / mozilla / ecma_2 / Exceptions / expression-005.js
1 /**
2     File Name:          expression-005.js
3     Corresponds To:     11.2.2-10-n.js
4     ECMA Section:       11.2.2. The new operator
5     Description:
6
7     Author:             christine@netscape.com
8     Date:               12 november 1997
9 */
10
11     var SECTION = "expression-005";
12     var VERSION = "JS1_4";
13     var TITLE   = "The new operator";
14
15     startTest();
16     writeHeaderToLog( SECTION + " "+ TITLE);
17
18     var tc = 0;
19     var testcases = new Array();
20
21     var result = "Failed";
22     var expect = "Passed";
23     var exception = "No exception thrown";
24
25     try {
26         result = new Math();
27     } catch ( e ) {
28         result = expect;
29         exception = e.toString();
30     }
31
32     testcases[tc++] = new TestCase(
33         SECTION,
34         "result= new Math() (threw " + exception + ")",
35         expect,
36         result );
37
38     test();