summaryrefslogtreecommitdiff
path: root/js/src/tests/ecma/Date/15.9.5.12-2.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commitad18d877ddd2a44d98fa12ccd3dbbcf4d0ac4299 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/tests/ecma/Date/15.9.5.12-2.js
parent15477ed9af4859dacb069040b5d4de600803d3bc (diff)
downloadaura-central-ad18d877ddd2a44d98fa12ccd3dbbcf4d0ac4299.tar.gz
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/tests/ecma/Date/15.9.5.12-2.js')
-rw-r--r--js/src/tests/ecma/Date/15.9.5.12-2.js44
1 files changed, 44 insertions, 0 deletions
diff --git a/js/src/tests/ecma/Date/15.9.5.12-2.js b/js/src/tests/ecma/Date/15.9.5.12-2.js
new file mode 100644
index 000000000..9aabb985d
--- /dev/null
+++ b/js/src/tests/ecma/Date/15.9.5.12-2.js
@@ -0,0 +1,44 @@
+// |reftest| skip-if(!xulRuntime.shell&&xulRuntime.OS=="Linux"&&xulRuntime.XPCOMABI.match(/x86_64/)) -- bug xxx crash
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+
+/**
+ File Name: 15.9.5.12.js
+ ECMA Section: 15.9.5.12
+ Description: Date.prototype.getDay
+
+
+ 1. Let t be this time value.
+ 2. If t is NaN, return NaN.
+ 3. Return WeekDay(LocalTime(t)).
+
+ Author: christine@netscape.com
+ Date: 12 november 1997
+*/
+
+var SECTION = "15.9.5.12";
+var VERSION = "ECMA_1";
+startTest();
+var TITLE = "Date.prototype.getDay()";
+
+writeHeaderToLog( SECTION + " "+ TITLE);
+
+addTestCase( TIME_0000 );
+
+test();
+
+function addTestCase( t ) {
+ var start = TimeFromYear(YearFromTime(t));
+ var stop = TimeFromYear(YearFromTime(t) + 1);
+
+ for (var d = start; d < stop; d += msPerDay)
+ {
+ new TestCase( SECTION,
+ "(new Date("+d+")).getDay()",
+ WeekDay((LocalTime(d))),
+ (new Date(d)).getDay() );
+ }
+}