js/src/tests/test262/ch08/8.5/S8.5_A5.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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  * NaN not greater or equal zero
     6  *
     7  * @path ch08/8.5/S8.5_A5.js
     8  * @description Compare NaN with zero
     9  */
    11 var x = NaN;
    12 var x_geq_0=(x >= 0.0);
    13 var x_leq_0=(x <= 0.0);
    14 var x_leq_0_OR_geq_0=(x <= 0.0)||(x >= 0.0);
    15 var x_geq_0_ADD_leq_0=(x >= 0.0) + (x <= 0.0);
    18 ///////////////////////////////////////////////////
    19 // CHECK#1
    20 if (x_geq_0){
    21   $ERROR('#1: NaN not greater or equal zero');
    22 } else {
    23   $PRINT('#1: NaN not greater or equal zero');
    24 }
    25 //
    26 ///////////////////////////////////////////////////
    28 ///////////////////////////////////////////////////
    29 // CHECK#2
    30 if (x_leq_0){
    31   $ERROR('#2: NaN not less or equal zero');
    32 } else {
    33   $PRINT('#2: NaN not less or equal zero');
    34 }
    35 //
    36 ///////////////////////////////////////////////////
    38 ///////////////////////////////////////////////////
    39 // CHECK#3
    40 if (x_leq_0_OR_geq_0){
    41   $ERROR('#3: NaN not less or equal zero OR greater or equal zero');
    42 } else {
    43   $PRINT('#3: NaN not less or equal zero OR greater or equal zero');
    44 }
    45 //
    46 ///////////////////////////////////////////////////
    48 ///////////////////////////////////////////////////
    49 // CHECK#4
    50 if (x_geq_0_ADD_leq_0){
    51   $ERROR('#4: NaN not less or equal zero ADD greater or equal zero');
    52 } else {
    53   $PRINT('#4: NaN not less or equal zero ADD greater or equal zero');
    54 }
    55 //
    56 ///////////////////////////////////////////////////

mercurial