]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma/Date/15.9.5.js
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/
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.
11 * The Original Code is Mozilla Communicator client code, released March
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
24 ECMA Section: 15.9.5 Properties of the Date prototype object
27 The Date prototype object is itself a Date object (its [[Class]] is
28 "Date") whose value is NaN.
30 The value of the internal [[Prototype]] property of the Date prototype
31 object is the Object prototype object (15.2.3.1).
33 In following descriptions of functions that are properties of the Date
34 prototype object, the phrase "this Date object" refers to the object that
35 is the this value for the invocation of the function; it is an error if
36 this does not refer to an object for which the value of the internal
37 [[Class]] property is "Date". Also, the phrase "this time value" refers
38 to the number value for the time represented by this Date object, that is,
39 the value of the internal [[Value]] property of this Date object.
41 Author: christine@netscape.com
42 Date: 12 november 1997
45 var SECTION
= "15.9.5";
46 var VERSION
= "ECMA_1";
48 var TITLE
= "Properties of the Date Prototype Object";
50 writeHeaderToLog( SECTION
+ " "+ TITLE
);
52 var testcases
= new Array();
54 Date
.prototype.getClass
= Object
.prototype.toString
;
56 testcases
[tc
++] = new TestCase( SECTION
,
57 "Date.prototype.getClass",
59 Date
.prototype.getClass() );
60 testcases
[tc
++] = new TestCase( SECTION
,
61 "Date.prototype.valueOf()",
63 Date
.prototype.valueOf() );
64 testcases
[tc
++] = new TestCase( SECTION
,
65 "Date.prototype.__proto__ == Object.prototype",
67 Date
.prototype.__proto__
== Object
.prototype );
70 for ( tc
=0; tc
< testcases
.length
; tc
++ ) {
71 testcases
[tc
].passed
= writeTestCaseResult(
74 testcases
[tc
].description
+" = "+
75 testcases
[tc
].actual
);
77 testcases
[tc
].reason
+= ( testcases
[tc
].passed
) ? "" : "wrong value ";