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

Unified Diff: dart/tests/compiler/dart2js/compiler_helper.dart

Issue 11788016: Update dart2js unit tests to new library API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: No need to implement Iterable 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
Index: dart/tests/compiler/dart2js/compiler_helper.dart
diff --git a/dart/tests/compiler/dart2js/compiler_helper.dart b/dart/tests/compiler/dart2js/compiler_helper.dart
index 2bc5a08e06db2c010194393bc7ba2fdd509113d2..ebebfa663e094f4aced4a5ec723432491b6f26f1 100644
--- a/dart/tests/compiler/dart2js/compiler_helper.dart
+++ b/dart/tests/compiler/dart2js/compiler_helper.dart
@@ -82,11 +82,12 @@ String getNumberTypeCheck(String variable) {
}
bool checkNumberOfMatches(Iterator it, int nb) {
+ bool hasNext = it.moveNext();
for (int i = 0; i < nb; i++) {
- Expect.isTrue(it.hasNext, "Found less than $nb matches");
- it.next();
+ Expect.isTrue(hasNext, "Found less than $nb matches");
+ hasNext = it.moveNext();
}
- Expect.isFalse(it.hasNext, "Found more than $nb matches");
+ Expect.isFalse(hasNext, "Found more than $nb matches");
}
void compileAndMatch(String code, String entry, RegExp regexp) {
« no previous file with comments | « dart/sdk/lib/_internal/compiler/implementation/util/link.dart ('k') | dart/tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698