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

Unified Diff: test/dart_codegen/expect/collection/iterator.dart

Issue 963593002: Disable formatting and add new-lines to make tests faster. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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: test/dart_codegen/expect/collection/iterator.dart
diff --git a/test/dart_codegen/expect/collection/iterator.dart b/test/dart_codegen/expect/collection/iterator.dart
index 8f57c73a31f4db20fd700219b1863ff633aba432..6b0a400184a7b9e32796811c34fe3ae935a750a7 100644
--- a/test/dart_codegen/expect/collection/iterator.dart
+++ b/test/dart_codegen/expect/collection/iterator.dart
@@ -1,30 +1,26 @@
part of dart.collection;
-
-class HasNextIterator<E> {
- static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
- static const int _NO_NEXT = 1;
- static const int _NOT_MOVED_YET = 2;
- Iterator _iterator;
- int _state = _NOT_MOVED_YET;
- HasNextIterator(this._iterator);
- bool get hasNext {
- if (_state == _NOT_MOVED_YET) _move();
- return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
+ class HasNextIterator<E> {static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
+ static const int _NO_NEXT = 1;
+ static const int _NOT_MOVED_YET = 2;
+ Iterator _iterator;
+ int _state = _NOT_MOVED_YET;
+ HasNextIterator(this._iterator);
+ bool get hasNext {
+ if (_state == _NOT_MOVED_YET) _move();
+ return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
}
- E next() {
- if (!hasNext) throw new StateError("No more elements");
- assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT);
- E result = DDC$RT.cast(_iterator.current, dynamic, E, "CastGeneral",
- """line 33, column 16 of dart:collection/iterator.dart: """,
- _iterator.current is E, false);
- _move();
- return result;
+ E next() {
+ if (!hasNext) throw new StateError("No more elements");
+ assert (_state == _HAS_NEXT_AND_NEXT_IN_CURRENT); E result = DDC$RT.cast(_iterator.current, dynamic, E, "CastGeneral", """line 33, column 16 of dart:collection/iterator.dart: """, _iterator.current is E, false);
+ _move();
+ return result;
}
- void _move() {
- if (_iterator.moveNext()) {
- _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
- } else {
- _state = _NO_NEXT;
+ void _move() {
+ if (_iterator.moveNext()) {
+ _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
+ }
+ else {
+ _state = _NO_NEXT;
}
}
}

Powered by Google App Engine
This is Rietveld 408576698