michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * [[Construct]] constructs an object. Invoked via the new operator. Objects that implement this internal method are called constructors michael@0: * michael@0: * @path ch08/8.6/8.6.2/S8.6.2_A6.js michael@0: * @description Create a few Objects via the new operator michael@0: */ michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#1 michael@0: var objInstance=new Object; michael@0: if (objInstance.constructor !== Object){ michael@0: $ERROR('#1: var objInstance=new Object; objInstance.constructor === Object. Actual: ' + (objInstance.constructor)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: //CHECK#2 michael@0: var numInstance=new Number; michael@0: if (numInstance.constructor !== Number){ michael@0: $ERROR('#2: var numInstance=new Number; numInstance.constructor === Number. Actual: ' + (numInstance.constructor)); michael@0: } michael@0: // michael@0: ////////////////////////////////////////////////////////////////////////////// michael@0: