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

Side by Side Diff: test/mjsunit/date.js

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 assertDoesNotThrow("new Date(-0, -0, -0, -0, -0, -0. -0)"); 160 assertDoesNotThrow("new Date(-0, -0, -0, -0, -0, -0. -0)");
161 assertDoesNotThrow("new Date(0x40000000, 0x40000000, 0x40000000," + 161 assertDoesNotThrow("new Date(0x40000000, 0x40000000, 0x40000000," +
162 "0x40000000, 0x40000000, 0x40000000, 0x40000000)") 162 "0x40000000, 0x40000000, 0x40000000, 0x40000000)")
163 assertDoesNotThrow("new Date(-0x40000001, -0x40000001, -0x40000001," + 163 assertDoesNotThrow("new Date(-0x40000001, -0x40000001, -0x40000001," +
164 "-0x40000001, -0x40000001, -0x40000001, -0x40000001)") 164 "-0x40000001, -0x40000001, -0x40000001, -0x40000001)")
165 165
166 166
167 // Modified test from WebKit 167 // Modified test from WebKit
168 // LayoutTests/fast/js/script-tests/date-utc-timeclip.js: 168 // LayoutTests/fast/js/script-tests/date-utc-timeclip.js:
169 169
170 assertEquals(Date.UTC(275760, 8, 12, 23, 59, 59, 999), 8639999999999999); 170 assertEquals(8639999999999999, Date.UTC(275760, 8, 12, 23, 59, 59, 999));
171 assertEquals(Date.UTC(275760, 8, 13), 8640000000000000); 171 assertEquals(8640000000000000, Date.UTC(275760, 8, 13));
172 assertTrue(isNaN(Date.UTC(275760, 8, 13, 0, 0, 0, 1))); 172 assertTrue(isNaN(Date.UTC(275760, 8, 13, 0, 0, 0, 1)));
173 assertTrue(isNaN(Date.UTC(275760, 8, 14))); 173 assertTrue(isNaN(Date.UTC(275760, 8, 14)));
174 174
175 assertEquals(Date.UTC(-271821, 3, 20, 0, 0, 0, 1), -8639999999999999); 175 assertEquals(Date.UTC(-271821, 3, 20, 0, 0, 0, 1), -8639999999999999);
176 assertEquals(Date.UTC(-271821, 3, 20), -8640000000000000); 176 assertEquals(Date.UTC(-271821, 3, 20), -8640000000000000);
177 assertTrue(isNaN(Date.UTC(-271821, 3, 19, 23, 59, 59, 999))); 177 assertTrue(isNaN(Date.UTC(-271821, 3, 19, 23, 59, 59, 999)));
178 assertTrue(isNaN(Date.UTC(-271821, 3, 19))); 178 assertTrue(isNaN(Date.UTC(-271821, 3, 19)));
179
180
181 // Test creation of large date values.
182 d = new Date(1969, 12, 1, 99999999999);
183 assertTrue(isNaN(d.getTime()));
184 d = new Date(1969, 12, 1, -99999999999);
185 assertTrue(isNaN(d.getTime()));
186 d = new Date(1969, 12, 1, Infinity);
187 assertTrue(isNaN(d.getTime()));
188 d = new Date(1969, 12, 1, -Infinity);
189 assertTrue(isNaN(d.getTime()));
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/regress-intoverflow.js ('k') | test/mjsunit/debug-evaluate-with-context.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698