Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /**
8 * File Name: boolean-001.js
9 * Description:
10 *
11 * In JavaScript 1.2, new Boolean(false) evaluates to false.
12 *
13 * Author: christine@netscape.com
14 * Date: 11 August 1998
15 */
16 var SECTION = "boolean-001.js";
17 var VERSION = "JS_1.3";
18 var TITLE = "new Boolean(false) should evaluate to false";
20 startTest();
21 writeHeaderToLog( SECTION + " "+ TITLE);
23 BooleanTest( "new Boolean(true)", new Boolean(true), true );
24 BooleanTest( "new Boolean(false)", new Boolean(false), true );
25 BooleanTest( "true", true, true );
26 BooleanTest( "false", false, false );
28 test();
30 function BooleanTest( string, object, expect ) {
31 if ( object ) {
32 result = true;
33 } else {
34 result = false;
35 }
37 new TestCase(
38 SECTION,
39 string,
40 expect,
41 result );
42 }