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

Side by Side 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, 9 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 unified diff | Download patch
OLDNEW
1 part of dart.collection; 1 part of dart.collection;
2 2 class HasNextIterator<E> {static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
3 class HasNextIterator<E> { 3 static const int _NO_NEXT = 1;
4 static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0; 4 static const int _NOT_MOVED_YET = 2;
5 static const int _NO_NEXT = 1; 5 Iterator _iterator;
6 static const int _NOT_MOVED_YET = 2; 6 int _state = _NOT_MOVED_YET;
7 Iterator _iterator; 7 HasNextIterator(this._iterator);
8 int _state = _NOT_MOVED_YET; 8 bool get hasNext {
9 HasNextIterator(this._iterator); 9 if (_state == _NOT_MOVED_YET) _move();
10 bool get hasNext { 10 return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
11 if (_state == _NOT_MOVED_YET) _move();
12 return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
13 } 11 }
14 E next() { 12 E next() {
15 if (!hasNext) throw new StateError("No more elements"); 13 if (!hasNext) throw new StateError("No more elements");
16 assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT); 14 assert (_state == _HAS_NEXT_AND_NEXT_IN_CURRENT); E result = DDC$RT.cast(_ite rator.current, dynamic, E, "CastGeneral", """line 33, column 16 of dart:collecti on/iterator.dart: """, _iterator.current is E, false);
17 E result = DDC$RT.cast(_iterator.current, dynamic, E, "CastGeneral", 15 _move();
18 """line 33, column 16 of dart:collection/iterator.dart: """, 16 return result;
19 _iterator.current is E, false);
20 _move();
21 return result;
22 } 17 }
23 void _move() { 18 void _move() {
24 if (_iterator.moveNext()) { 19 if (_iterator.moveNext()) {
25 _state = _HAS_NEXT_AND_NEXT_IN_CURRENT; 20 _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
26 } else { 21 }
27 _state = _NO_NEXT; 22 else {
23 _state = _NO_NEXT;
28 } 24 }
29 } 25 }
30 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698