js/src/tests/test262/ch08/8.6/8.6.2/S8.6.2_A2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     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  * Properties of the [[Prototype]] object
     6  * are visible as properties of the child object for the purposes of get access, but not for put access
     7  *
     8  * @path ch08/8.6/8.6.2/S8.6.2_A2.js
     9  * @description Check visibility properties of the child object for the purposes of get access, but not for put access
    10  */
    12 //Establish foo object
    13 function FooObj(){};
    14 FooObj.prototype.prop="some";
    16 // Invoke instance of foo object
    17 var foo= new FooObj;
    19 //////////////////////////////////////////////////////////////////////////////
    20 //CHECK#1
    21 if (foo.prop !== "some"){
    22   $ERROR('#1: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop === "some". Actual: ' + (foo.prop));
    23 }
    24 //
    25 //////////////////////////////////////////////////////////////////////////////
    27 //////////////////////////////////////////////////////////////////////////////
    28 //CHECK#2
    29 foo.prop=true;
    30 // Invoke another instance of foo object
    31 var foo__ = new FooObj;
    32 if (foo__.prop !== "some"){
    33   $ERROR('#2: function FooObj(){}; FooObj.prototype.prop="some"; var foo= new FooObj; foo.prop=true; var foo__ = new FooObj; foo__.prop === "some". Actual: ' + (foo__.prop));
    34 }
    35 //
    36 //////////////////////////////////////////////////////////////////////////////

mercurial