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

Unified Diff: pkg/unittest/lib/mock.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/matcher.dart ('k') | pkg/unittest/lib/src/collection_matchers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/mock.dart
diff --git a/pkg/unittest/lib/mock.dart b/pkg/unittest/lib/mock.dart
index bf9d1bd545dab72a40489b681f306f8d11c32e79..d1a98d7dcc36962fbff20c585f48f4d649d009f6 100644
--- a/pkg/unittest/lib/mock.dart
+++ b/pkg/unittest/lib/mock.dart
@@ -844,8 +844,9 @@ class LogEntryList {
remainingCount = logs.length;
}
- var keyIterator = keys.logs.iterator();
- LogEntry keyEntry = keyIterator.next();
+ var keyIterator = keys.logs.iterator;
+ keyIterator.moveNext();
+ LogEntry keyEntry = keyIterator.current;
MatchState matchState = new MatchState();
for (LogEntry logEntry in logs) {
@@ -869,8 +870,8 @@ class LogEntryList {
if (includeKeys) {
rtn.logs.add(keyEntry);
}
- if (keyIterator.hasNext) {
- keyEntry = keyIterator.next();
+ if (keyIterator.moveNext()) {
+ keyEntry = keyIterator.current;
} else if (isPreceding) { // We're done.
break;
}
@@ -1460,7 +1461,7 @@ class Mock {
if (name == null) { // This log is not shared.
log.logs.clear();
} else { // This log may be shared.
- log.logs = log.logs.filter((e) => e.mockName != name);
+ log.logs = log.logs.where((e) => e.mockName != name).toList();
}
}
}
« no previous file with comments | « pkg/unittest/lib/matcher.dart ('k') | pkg/unittest/lib/src/collection_matchers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698