js/src/tests/test262/ch08/8.6/8.6.2/S8.6.2_A5_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.

     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  * [[Call]] executes code associated with the object
     6  *
     7  * @path ch08/8.6/8.6.2/S8.6.2_A5_T4.js
     8  * @description Call function-property of global object, property defined
     9  *  as this['beep']=function(){__count++}
    10  */
    12 var __count=0;
    14 this["beep"]=function(){__count++};
    15 //////////////////////////////////////////////////////////////////////////////
    16 //CHECK#1
    17 beep();
    18 if (__count !==1) {
    19   $ERROR('#1: __count=0; this["beep"]=function(){__count++}; beep(); __count === 1. Actual: ' + (__count));
    20 }
    21 //
    22 //////////////////////////////////////////////////////////////////////////////
    24 //////////////////////////////////////////////////////////////////////////////
    25 //CHECK#2
    26 this["beep"]();
    27 if (__count !==2) {
    28   $ERROR('#2: __count=0; this["beep"]=function(){__count++}; beep(); this["beep"](); __count === 2. Actual: ' + (__count));
    29 }
    30 //
    31 //////////////////////////////////////////////////////////////////////////////

mercurial