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

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

Issue 11410086: Use iterator, moveNext(), current. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Address comments. Created 8 years, 1 month 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
Index: pkg/unittest/lib/mock.dart
diff --git a/pkg/unittest/lib/mock.dart b/pkg/unittest/lib/mock.dart
index 9ddab17bb7bef70eb42e37982cfc2945c172ba63..2418d85217e5b5a009af400f799877d77091a786 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;
}

Powered by Google App Engine
This is Rietveld 408576698