]> git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/expression-006.js
JavaScriptCore-7601.1.46.3.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / expression-006.js
1 /**
2 File Name: expression-006.js
3 Corresponds to: 11.2.2-1-n.js
4 ECMA Section: 11.2.2. The new operator
5 Description:
6
7 http://scopus/bugsplat/show_bug.cgi?id=327765
8
9 Author: christine@netscape.com
10 Date: 12 november 1997
11 */
12 var SECTION = "expression-006.js";
13 var VERSION = "JS1_4";
14 var TITLE = "The new operator";
15 var BUGNUMBER="327765";
16
17 startTest();
18 writeHeaderToLog( SECTION + " "+ TITLE);
19
20 var tc = 0;
21 var testcases = new Array();
22
23 var result = "Failed";
24 var exception = "No exception thrown";
25 var expect = "Passed";
26
27 try {
28 var OBJECT = new Object();
29 result = new OBJECT();
30 } catch ( e ) {
31 result = expect;
32 exception = e.toString();
33 }
34
35 testcases[tc++] = new TestCase(
36 SECTION,
37 "OBJECT = new Object; result = new OBJECT()" +
38 " (threw " + exception +")",
39 expect,
40 result );
41
42 test();
43