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

mercurial