]> git.saurik.com Git - apple/javascriptcore.git/blame - tests/mozilla/ecma_2/Exceptions/expression-013.js
JavaScriptCore-461.tar.gz
[apple/javascriptcore.git] / tests / mozilla / ecma_2 / Exceptions / expression-013.js
CommitLineData
b37bf2e1
A
1/**
2 File Name: expression-013.js
3 Corresponds To: ecma/Expressions/11.2.2-8-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-013";
10 var VERSION = "JS1_4";
11 var TITLE = "The new operator";
12 var BUGNUMBER= "327765";
13
14 startTest();
15 writeHeaderToLog( SECTION + " "+ TITLE);
16
17 var tc = 0;
18 var testcases = new Array();
19
20 var NUMBER = new Number(1);
21
22 var result = "Failed";
23 var exception = "No exception thrown";
24 var expect = "Passed";
25
26 try {
27 result = new NUMBER();
28 } catch ( e ) {
29 result = expect;
30 exception = e.toString();
31 }
32
33 testcases[tc++] = new TestCase(
34 SECTION,
35 "NUMBER = new Number(1); result = new NUMBER()" +
36 " (threw " + exception +")",
37 expect,
38 result );
39
40 test();
41