js/src/tests/test262/ch12/12.5/S12.5_A1.1_T1.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  * 0, null, undefined, false, empty string, NaN in expression is evaluated to false
     6  *
     7  * @path ch12/12.5/S12.5_A1.1_T1.js
     8  * @description Using "if" without "else" construction
     9  */
    11 //////////////////////////////////////////////////////////////////////////////
    12 //CHECK#1
    14 if(0)
    15 	$ERROR('#1: 0 in expression is evaluated to false ');
    16 //
    17 //////////////////////////////////////////////////////////////////////////////
    19 //////////////////////////////////////////////////////////////////////////////
    20 //CHECK#2
    21 if(false)
    22     $ERROR('#2: false in expression is evaluated to false ');
    23 //
    24 //////////////////////////////////////////////////////////////////////////////
    26 //////////////////////////////////////////////////////////////////////////////
    27 //CHECK#3
    28 if(null)
    29 	$ERROR('#3: null in expression is evaluated to false ');
    30 //
    31 //////////////////////////////////////////////////////////////////////////////
    33 //////////////////////////////////////////////////////////////////////////////
    34 //CHECK#4
    35 if(undefined)
    36 	$ERROR('#4: undefined in expression is evaluated to false ');
    37 //
    38 //////////////////////////////////////////////////////////////////////////////
    40 //////////////////////////////////////////////////////////////////////////////
    41 //CHECK#5
    42 if("")
    43     $ERROR('#5: empty string in expression is evaluated to false ');
    44 //
    45 //////////////////////////////////////////////////////////////////////////////
    47 //////////////////////////////////////////////////////////////////////////////
    48 //CHECK#6
    49 if(NaN)
    50     $ERROR('#5: NaN in expression is evaluated to false ');
    51 //
    52 //////////////////////////////////////////////////////////////////////////////

mercurial