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

Unified Diff: pkg/unittest/test/mock_test.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 years, 11 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 | « pkg/unittest/lib/src/test_case.dart ('k') | runtime/bin/secure_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/test/mock_test.dart
diff --git a/pkg/unittest/test/mock_test.dart b/pkg/unittest/test/mock_test.dart
index 4989a666347bcd33cbd03df6b7b652c30fde67c6..181a08aef5ccebd1b5e9abeca0bcd91b59382775 100644
--- a/pkg/unittest/test/mock_test.dart
+++ b/pkg/unittest/test/mock_test.dart
@@ -24,7 +24,7 @@ class FooSpy extends Mock implements Foo {
makeTestLogEntry(String methodName, List args, int time,
[String mockName]) {
LogEntry e = new LogEntry(mockName, methodName, args, Action.IGNORE);
- e.time = new Date.fromMillisecondsSinceEpoch(time, isUtc: true);
+ e.time = new DateTime.fromMillisecondsSinceEpoch(time, isUtc: true);
return e;
}
@@ -220,11 +220,11 @@ main() {
test('Mocking: from,after,before,until', () {
LogEntryList logList = makeTestLog();
LogEntryList log2;
- Date t0 = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
- Date t1000 = new Date.fromMillisecondsSinceEpoch(1000, isUtc: true);
- Date t2000 = new Date.fromMillisecondsSinceEpoch(2000, isUtc: true);
- Date t3000 = new Date.fromMillisecondsSinceEpoch(3000, isUtc: true);
- Date t4000 = new Date.fromMillisecondsSinceEpoch(4000, isUtc: true);
+ DateTime t0 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
+ DateTime t1000 = new DateTime.fromMillisecondsSinceEpoch(1000, isUtc: true);
+ DateTime t2000 = new DateTime.fromMillisecondsSinceEpoch(2000, isUtc: true);
+ DateTime t3000 = new DateTime.fromMillisecondsSinceEpoch(3000, isUtc: true);
+ DateTime t4000 = new DateTime.fromMillisecondsSinceEpoch(4000, isUtc: true);
log2 = logList.before(t0);
expect(log2.logs, hasLength(0));
@@ -306,11 +306,11 @@ main() {
});
test('Mocking: inplace from,after,before,until', () {
- Date t0 = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
- Date t1000 = new Date.fromMillisecondsSinceEpoch(1000, isUtc: true);
- Date t2000 = new Date.fromMillisecondsSinceEpoch(2000, isUtc: true);
- Date t3000 = new Date.fromMillisecondsSinceEpoch(3000, isUtc: true);
- Date t4000 = new Date.fromMillisecondsSinceEpoch(4000, isUtc: true);
+ DateTime t0 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
+ DateTime t1000 = new DateTime.fromMillisecondsSinceEpoch(1000, isUtc: true);
+ DateTime t2000 = new DateTime.fromMillisecondsSinceEpoch(2000, isUtc: true);
+ DateTime t3000 = new DateTime.fromMillisecondsSinceEpoch(3000, isUtc: true);
+ DateTime t4000 = new DateTime.fromMillisecondsSinceEpoch(4000, isUtc: true);
LogEntryList logList = makeTestLog().before(t0, true);
expect(logList.logs, hasLength(0));
« no previous file with comments | « pkg/unittest/lib/src/test_case.dart ('k') | runtime/bin/secure_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698