Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(941)

Unified Diff: test/mjsunit/date.js

Issue 21507: Experimental: port bleeding_edge r1276 (a grab bag of optimizations)... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/codegen-ia32.cc ('K') | « src/v8natives.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/date.js
===================================================================
--- test/mjsunit/date.js (revision 1313)
+++ test/mjsunit/date.js (working copy)
@@ -42,7 +42,21 @@
assertEquals(date1, date2);
assertEquals(date2, date3);
+// Test limits (+/-1e8 days from epoch)
+var dMax = new Date(8.64e15);
+assertEquals(8.64e15, dMax.getTime());
+
+var dOverflow = new Date(8.64e15+1);
+assertTrue(isNaN(dOverflow.getTime()));
+
+var dMin = new Date(-8.64e15);
+assertEquals(-8.64e15, dMin.getTime());
+
+var dUnderflow = new Date(-8.64e15-1);
+assertTrue(isNaN(dUnderflow.getTime()));
+
+
// Tests inspired by js1_5/Date/regress-346363.js
// Year
« src/codegen-ia32.cc ('K') | « src/v8natives.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698