js/src/tests/test262/ch13/13.2/S13.2.1_A9.1_T2.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  * When the [[Call]] property for a Function object is called,
     6  * the body is evaluated and if evaluation result has type "normal", then "undefined" is returned
     7  *
     8  * @path ch13/13.2/S13.2.1_A9.1_T2.js
     9  * @description Declaring a function with "var __func = function()" and no "return" in the function body
    10  */
    12 var x;
    14 var __func = function(){
    15     x = true;
    16 }
    18 //////////////////////////////////////////////////////////////////////////////
    19 //CHECK#1
    20 if (__func() !== undefined) {
    21 	$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());
    22 };
    23 //
    24 //////////////////////////////////////////////////////////////////////////////
    26 //////////////////////////////////////////////////////////////////////////////
    27 //CHECK#2
    28 if (!x) {
    29 	$ERROR('#2: x === true. Actual: x === '+x);
    30 }
    31 //
    32 //////////////////////////////////////////////////////////////////////////////

mercurial