1 /** 2 File Name: expression-014.js 3 Corresponds To: ecma/Expressions/11.2.2-9-n.js 4 ECMA Section: 11.2.2. The new operator 5 Description: 6 7 Author: christine (at) netscape.com 8 Date: 12 november 1997 9 */ 10 var SECTION = "expression-014.js"; 11 var VERSION = "ECMA_1"; 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 BOOLEAN = new Boolean(); 22 23 24 var result = "Failed"; 25 var exception = "No exception thrown"; 26 var expect = "Passed"; 27 28 try { 29 result = new BOOLEAN(); 30 } catch ( e ) { 31 result = expect; 32 exception = e.toString(); 33 } 34 35 testcases[tc++] = new TestCase( 36 SECTION, 37 "BOOLEAN = new Boolean(); result = new BOOLEAN()" + 38 " (threw " + exception +")", 39 expect, 40 result ); 41 42 test(); 43 44