js/src/tests/test262/ch12/12.5/S12.5_A1_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  * 1, true, non-empty string in expression is evaluated to true
     6  *
     7  * @path ch12/12.5/S12.5_A1_T1.js
     8  * @description Using "if" without "else" construction
     9  */
    11 //////////////////////////////////////////////////////////////////////////////
    12 //CHECK#1
    13 if(!(1))
    14 	$ERROR('#1: 1 in expression is evaluated to true');
    15 //
    16 //////////////////////////////////////////////////////////////////////////////
    18 //////////////////////////////////////////////////////////////////////////////
    19 //CHECK#2
    20 if(!(true))
    21 	$ERROR('#2: true in expression is evaluated to true');
    22 //
    23 //////////////////////////////////////////////////////////////////////////////
    25 //////////////////////////////////////////////////////////////////////////////
    26 //CHECK#3
    27 if(!("1"))
    28 	$ERROR('#3: "1" in expression is evaluated to true');
    29 //
    30 //////////////////////////////////////////////////////////////////////////////
    32 //////////////////////////////////////////////////////////////////////////////
    33 //CHECK#4
    34 if(!("A"))
    35 	$ERROR('#4: "A" in expression is evaluated to true');
    36 //
    37 //////////////////////////////////////////////////////////////////////////////

mercurial