js/src/tests/test262/ch13/13.2/S13.2.2_A15_T4.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 // Copyright 2009 the Sputnik authors. All rights reserved.
michael@0 2 // This code is governed by the BSD license found in the LICENSE file.
michael@0 3
michael@0 4 /**
michael@0 5 * When the [[Construct]] property for a Function object F is called,
michael@0 6 * and the object created in the function is returned, the object (declared with "this" within a function) will be strong and healthy
michael@0 7 *
michael@0 8 * @path ch13/13.2/S13.2.2_A15_T4.js
michael@0 9 * @description Function declared at the end of the program and "obj" property is declared with "obj = {}"
michael@0 10 */
michael@0 11
michael@0 12 __FACTORY = function(){
michael@0 13 this.prop = 1;
michael@0 14 obj = {};
michael@0 15 obj.prop = "A";
michael@0 16 obj.slot = this;
michael@0 17 return obj;
michael@0 18 }
michael@0 19
michael@0 20 __obj = new __FACTORY();
michael@0 21
michael@0 22 //////////////////////////////////////////////////////////////////////////////
michael@0 23 //CHECK#1
michael@0 24 if (obj.prop !== "A") {
michael@0 25 $ERROR('#1: obj.prop === "A". Actual: obj.prop ==='+obj.prop);
michael@0 26 }
michael@0 27 //
michael@0 28 //////////////////////////////////////////////////////////////////////////////
michael@0 29
michael@0 30 //////////////////////////////////////////////////////////////////////////////
michael@0 31 //CHECK#2
michael@0 32 if (__obj.prop !== "A") {
michael@0 33 $ERROR('#2: __obj.prop === "A". Actual: __obj.prop ==='+obj.prop);
michael@0 34 }
michael@0 35 //
michael@0 36 //////////////////////////////////////////////////////////////////////////////
michael@0 37
michael@0 38 //////////////////////////////////////////////////////////////////////////////
michael@0 39 //CHECK#3
michael@0 40 if (__obj.slot.prop !==1) {
michael@0 41 $ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+obj.slot.prop);
michael@0 42 }
michael@0 43 //
michael@0 44 //////////////////////////////////////////////////////////////////////////////
michael@0 45
michael@0 46

mercurial