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 * Gets the value of the [[Prototype]] property of the F(Denote it PROTO_VAL).
8 * If PROTO_VAL is an object, sets the [[Prototype]] property of native ECMAScript object just created
9 * to the PROTO_VAL
10 *
11 * @path ch13/13.2/S13.2.2_A4_T2.js
12 * @description Declaring a function with "__FACTORY = function()"
13 */
15 __CUBE="cube";
17 __FACTORY = function(){};
19 __FACTORY.prototype={ shape:__CUBE, printShape:function(){return this.shape;} };
21 __device = new __FACTORY();
23 //////////////////////////////////////////////////////////////////////////////
24 //CHECK#1
25 if (__device.printShape === undefined) {
26 $ERROR('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);
27 }
28 //
29 //////////////////////////////////////////////////////////////////////////////
31 //////////////////////////////////////////////////////////////////////////////
32 //CHECK#2
33 if (__device.printShape() !== __CUBE) {
34 $ERROR('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());
35 }
36 //
37 //////////////////////////////////////////////////////////////////////////////