]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/expression-008.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / expression-008.js
1 /**
2 File Name: expression-008
3 Corresponds To: 11.2.2-3-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-008";
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 NULL = null;
20 var result = "Failed";
21 var exception = "No exception thrown";
22 var expect = "Passed";
23
24 try {
25 result = new NULL();
26 } catch ( e ) {
27 result = expect;
28 exception = e.toString();
29 }
30
31 testcases[tc++] = new TestCase(
32 SECTION,
33 "NULL = null; result = new NULL()" +
34 " (threw " + exception +")",
35 expect,
36 result );
37
38 test();