1 /* The contents of this file are subject to the Netscape Public 2 * License Version 1.1 (the "License"); you may not use this file 3 * except in compliance with the License. You may obtain a copy of 4 * the License at http://www.mozilla.org/NPL/ 5 * 6 * Software distributed under the License is distributed on an "AS 7 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or 8 * implied. See the License for the specific language governing 9 * rights and limitations under the License. 10 * 11 * The Original Code is Mozilla Communicator client code, released March 12 * 31, 1998. 13 * 14 * The Initial Developer of the Original Code is Netscape Communications 15 * Corporation. Portions created by Netscape are 16 * Copyright (C) 1998 Netscape Communications Corporation. All 17 * Rights Reserved. 18 * 19 * Contributor(s): 20 * 21 */ 22 /** 23 File Name: 15.6.4.js 24 ECMA Section: Properties of the Boolean Prototype Object 25 Description: 26 The Boolean prototype object is itself a Boolean object (its [[Class]] is " 27 Boolean") whose value is false. 28 29 The value of the internal [[Prototype]] property of the Boolean prototype 30 object is the Object prototype object (15.2.3.1). 31 32 In following descriptions of functions that are properties of the Boolean 33 prototype object, the phrase "this Boolean object" refers to the object that 34 is the this value for the invocation of the function; it is an error if 35 this does not refer to an object for which the value of the internal 36 [[Class]] property is "Boolean". Also, the phrase "this boolean value" 37 refers to the boolean value represented by this Boolean object, that is, 38 the value of the internal [[Value]] property of this Boolean object. 39 40 Author: christine (at) netscape.com 41 Date: 12 november 1997 42 */ 43 44 var SECTION = "15.6.4"; 45 var VERSION = "ECMA_1"; 46 startTest(); 47 var TITLE = "Properties of the Boolean Prototype Object"; 48 49 writeHeaderToLog( SECTION + " "+ TITLE); 50 51 var testcases = new Array(); 52 53 testcases[tc++] = new TestCase( SECTION, 54 "Boolean.prototype == false", 55 true, 56 Boolean.prototype == false ); 57 58 testcases[tc++] = new TestCase( SECTION, 59 "Boolean.prototype.toString = Object.prototype.toString; Boolean.prototype.toString()", 60 "[object Boolean]", 61 eval("Boolean.prototype.toString = Object.prototype.toString; Boolean.prototype.toString()") ); 62 63 test(); 64 65 function test() { 66 for ( tc=0; tc < testcases.length; tc++ ) { 67 testcases[tc].passed = writeTestCaseResult( 68 testcases[tc].expect, 69 testcases[tc].actual, 70 testcases[tc].description +" = "+ 71 testcases[tc].actual ); 72 73 testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; 74 } 75 stopTest(); 76 return ( testcases ); 77 } 78