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