]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/mozilla/ecma_2/Exceptions/expression-007.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / expression-007.js
CommitLineData
b37bf2e1
A
1/**
2 File Name: expression-007.js
3 Corresponds To: 11.2.2-2-n.js
4 ECMA Section: 11.2.2. The new operator
5 Description:
6
7
8 Author: christine@netscape.com
9 Date: 12 november 1997
10*/
11 var SECTION = "expression-007";
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 exception = "No exception thrown";
23 var expect = "Passed";
24
25 try {
26 UNDEFINED = void 0;
27 result = new UNDEFINED();
28 } catch ( e ) {
29 result = expect;
30 exception = e.toString();
31 }
32
33 testcases[tc++] = new TestCase(
34 SECTION,
35 "UNDEFINED = void 0; result = new UNDEFINED()" +
36 " (threw " + exception +")",
37 expect,
38 result );
39
40 test();
41