initial import
[vuplus_webkit] / Source / JavaScriptCore / tests / mozilla / ecma_2 / Exceptions / expression-010.js
1 /**
2     File Name:          expression-010.js
3     Corresponds To:     11.2.2-5-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-010";
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 NUMBER = 0;
20
21     var result = "Failed";
22     var exception = "No exception thrown";
23     var expect = "Passed";
24
25     try {
26         result = new NUMBER();
27     } catch ( e ) {
28         result = expect;
29         exception = e.toString();
30     }
31
32     testcases[tc++] = new TestCase(
33         SECTION,
34         "NUMBER=0, result = new NUMBER()" +
35         " (threw " + exception +")",
36         expect,
37         result );
38
39     test();
40