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

Unified Diff: tests/corelib/date_time_test.dart

Issue 1520613002: Enable more DateTime tests on dart2js. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | 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 9a9de1cfee66dbf6122321c8030f8f8f741d4c25..efb22069682ed38bb71f9c4b9481409a2d8b3f8c 100644
--- a/tests/corelib/date_time_test.dart
+++ b/tests/corelib/date_time_test.dart
@@ -37,17 +37,11 @@ void testMillisecondsSinceEpoch() {
}
void testMicrosecondsSinceEpoch() {
- // We chose a millisecondSinceEpoch that is guaranteed to fit into 53
- // bits when expressed as microseconds. Furthermore the microsecond part
- // is equal to 0, which means that an implementation that discards (or
- // rounds) microseconds should yield correct results for the following
- // test.
var dt1 = new DateTime.fromMillisecondsSinceEpoch(1);
var microsecondsSinceEpoch = dt1.microsecondsSinceEpoch;
var dt2 = new DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch);
Expect.equals(microsecondsSinceEpoch, dt2.microsecondsSinceEpoch);
- if (!supportsMicroseconds) return;
dt1 = new DateTime.now();
microsecondsSinceEpoch = dt1.microsecondsSinceEpoch;
dt2 = new DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698