js/src/tests/js1_2/version120/boolean-001.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 // |reftest| skip -- obsolete test
     2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     3 /* This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     8 /**
     9  *  File Name:          boolean-001.js
    10  *  Description:
    11  *
    12  *  In JavaScript 1.2, new Boolean(false) evaluates to false.
    13  *
    14  *  Author:             christine@netscape.com
    15  *  Date:               11 August 1998
    16  */
    17 var SECTION = "boolean-001.js";
    18 var VERSION = "JS1_2";
    19 startTest();
    20 var TITLE   = "new Boolean(false) should evaluate to false";
    22 writeHeaderToLog( SECTION + " "+ TITLE);
    24 BooleanTest( "new Boolean(true)",  new Boolean(true),  true );
    25 BooleanTest( "new Boolean(false)", new Boolean(false), false );
    26 BooleanTest( "true",               true,               true );
    27 BooleanTest( "false",              false,              false );
    29 test();
    31 function BooleanTest( string, object, expect ) {
    32   if ( object ) {
    33     result = true;
    34   } else {
    35     result = false;
    36   }
    38   new TestCase(
    39     SECTION,
    40     string,
    41     expect,
    42     result );
    43 }

mercurial