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

Unified Diff: tests/corelib/date_time_test.dart

Issue 12221094: Deprecate comparison operators of DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/date_time_test.dart
diff --git a/tests/corelib/date_time_test.dart b/tests/corelib/date_time_test.dart
index cceaa1c2529fd8359a599334e934998963cbc2ad..61500657a0294ba700667b4154f2c32a1895fd47 100644
--- a/tests/corelib/date_time_test.dart
+++ b/tests/corelib/date_time_test.dart
@@ -317,13 +317,16 @@ class DateTest {
static void testConstructors() {
var dt0 = new DateTime.utc(2011, 5, 11, 18, 58, 35, 0);
+ var dt0b = new DateTime.utc(2011, 5, 11, 18, 58, 35, 0).toLocal();
Expect.equals(1305140315000, dt0.millisecondsSinceEpoch);
var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000);
Expect.equals(dt1.millisecondsSinceEpoch, dt0.millisecondsSinceEpoch);
- Expect.equals(true, dt1 == dt0);
+ Expect.equals(false, dt1 == dt0);
+ Expect.equals(true, dt1 == dt0b);
var dt3 = new DateTime(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
dt1.second, dt1.millisecond);
Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch);
+ Expect.equals(false, dt3 == dt0);
Expect.equals(true, dt1 == dt3);
dt3 = new DateTime(
dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
« no previous file with comments | « tests/co19/co19-runtime.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698