Index: test/mjsunit/date.js |
=================================================================== |
--- test/mjsunit/date.js (revision 4006) |
+++ test/mjsunit/date.js (working copy) |
@@ -147,3 +147,17 @@ |
} |
testToLocaleTimeString(); |
+ |
+ |
+// Modified test from WebKit |
+// LayoutTests/fast/js/script-tests/date-utc-timeclip.js: |
+ |
+assertEquals(Date.UTC(275760, 8, 12, 23, 59, 59, 999), 8639999999999999); |
+assertEquals(Date.UTC(275760, 8, 13), 8640000000000000); |
+assertTrue(isNaN(Date.UTC(275760, 8, 13, 0, 0, 0, 1))); |
+assertTrue(isNaN(Date.UTC(275760, 8, 14))); |
+ |
+assertEquals(Date.UTC(-271821, 3, 20, 0, 0, 0, 1), -8639999999999999); |
+assertEquals(Date.UTC(-271821, 3, 20), -8640000000000000); |
+assertTrue(isNaN(Date.UTC(-271821, 3, 19, 23, 59, 59, 999))); |
+assertTrue(isNaN(Date.UTC(-271821, 3, 19))); |