1 /** 2 File Name: expression-011.js 3 Corresponds To: ecma/Expressions/11.2.2-6-n.js 4 ECMA Section: 11.2.2. The new operator 5 Description: 6 Author: christine (at) netscape.com 7 Date: 12 november 1997 8 */ 9 var SECTION = "expression-011"; 10 var VERSION = "JS1_4"; 11 var TITLE = "The new operator"; 12 13 startTest(); 14 writeHeaderToLog( SECTION + " "+ TITLE); 15 16 var tc = 0; 17 var testcases = new Array(); 18 19 var BOOLEAN = true; 20 21 var result = "Failed"; 22 var exception = "No exception thrown"; 23 var expect = "Passed"; 24 25 try { 26 var OBJECT = new BOOLEAN(); 27 } catch ( e ) { 28 result = expect; 29 exception = e.toString(); 30 } 31 32 testcases[tc++] = new TestCase( 33 SECTION, 34 "BOOLEAN = true; result = new BOOLEAN()" + 35 " (threw " + exception +")", 36 expect, 37 result ); 38 39 test(); 40 41