js/src/tests/ecma/Date/15.9.5.12-2.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:8612f9bd328b
1 // |reftest| skip-if(!xulRuntime.shell&&xulRuntime.OS=="Linux"&&xulRuntime.XPCOMABI.match(/x86_64/)) -- bug xxx crash
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/. */
6
7
8 /**
9 File Name: 15.9.5.12.js
10 ECMA Section: 15.9.5.12
11 Description: Date.prototype.getDay
12
13
14 1. Let t be this time value.
15 2. If t is NaN, return NaN.
16 3. Return WeekDay(LocalTime(t)).
17
18 Author: christine@netscape.com
19 Date: 12 november 1997
20 */
21
22 var SECTION = "15.9.5.12";
23 var VERSION = "ECMA_1";
24 startTest();
25 var TITLE = "Date.prototype.getDay()";
26
27 writeHeaderToLog( SECTION + " "+ TITLE);
28
29 addTestCase( TIME_0000 );
30
31 test();
32
33 function addTestCase( t ) {
34 var start = TimeFromYear(YearFromTime(t));
35 var stop = TimeFromYear(YearFromTime(t) + 1);
36
37 for (var d = start; d < stop; d += msPerDay)
38 {
39 new TestCase( SECTION,
40 "(new Date("+d+")).getDay()",
41 WeekDay((LocalTime(d))),
42 (new Date(d)).getDay() );
43 }
44 }

mercurial