js/src/tests/test262/ch08/8.3/S8.3_A1_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  * The Boolean type have two values, called true and false
     6  *
     7  * @path ch08/8.3/S8.3_A1_T2.js
     8  * @description Check type of true/false and it`s equality
     9  */
    11 //////////////////////////////////////////////////////////////////////
    12 // CHECK#1
    13 if (typeof(true) !== "boolean") {
    14   $ERROR('#1: typeof(true) === "boolean"');
    15 }
    16 //
    17 //////////////////////////////////////////////////////////////////////
    19 //////////////////////////////////////////////////////////////////////
    20 // CHECK#2
    21 if (typeof(true) != "boolean") {
    22   $ERROR('#2: typeof(true) == "boolean"');
    23 }
    24 //
    25 //////////////////////////////////////////////////////////////////////
    27 //////////////////////////////////////////////////////////////////////
    28 // CHECK#3
    29 if (typeof(false) !== "boolean") {
    30   $ERROR('#3: typeof(false) === "boolean"');
    31 }
    32 //
    33 //////////////////////////////////////////////////////////////////////
    35 //////////////////////////////////////////////////////////////////////
    36 // CHECK#4
    37 if (typeof(false) != "boolean") {
    38   $ERROR('#4: typeof(false) == "boolean"');
    39 }
    40 //
    41 //////////////////////////////////////////////////////////////////////
    43 //////////////////////////////////////////////////////////////////////
    44 // CHECK#5
    45 if (true === false) {
    46   $ERROR('#5: true !== false');
    47 }
    48 //
    49 //////////////////////////////////////////////////////////////////////
    51 //////////////////////////////////////////////////////////////////////
    52 // CHECK#6
    53 if (true == false) {
    54   $ERROR('#6: true != false');
    55 }
    56 //
    57 //////////////////////////////////////////////////////////////////////
    59 //////////////////////////////////////////////////////////////////////
    60 // CHECK#7
    61 if (false === true) {
    62   $ERROR('#7: false !== true');
    63 }
    64 //
    65 //////////////////////////////////////////////////////////////////////
    67 //////////////////////////////////////////////////////////////////////
    68 // CHECK#8
    69 if (false == true) {
    70   $ERROR('#8: false != true');
    71 }
    72 //
    73 //////////////////////////////////////////////////////////////////////

mercurial