Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /**
5 * When the [[Construct]] property for a Function object F is called:
6 * A new native ECMAScript object is created.
7 * It gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL).
8 * If PROTO_VAL is not an object, sets the [[Prototype]] property of native ECMAScript object just created
9 * to the original Object prototype object as described in 15.2.3.1
10 *
11 * @path ch13/13.2/S13.2.2_A3_T2.js
12 * @description Declaring a function with "var __FACTORY = function()"
13 */
15 var __FACTORY = function(){};
16 __FACTORY.prototype=1;
18 //////////////////////////////////////////////////////////////////////////////
19 //CHECK#1
20 if (typeof __FACTORY.prototype !== 'number') {
21 $ERROR('#1: typeof __FACTORY.prototype === \'number\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));
22 }
23 //
24 //////////////////////////////////////////////////////////////////////////////
26 var __device = new __FACTORY();
28 //////////////////////////////////////////////////////////////////////////////
29 //CHECK#2
30 if (!(Object.prototype.isPrototypeOf(__device))) {
31 $ERROR('#2: Object.prototype.isPrototypeOf(__device) === true');
32 }
33 //
34 //////////////////////////////////////////////////////////////////////////////