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

Unified Diff: test/generated_sdk/lib/collection/iterator.dart

Issue 1162723007: remove generated_sdk from checked in code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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/generated_sdk/lib/collection/iterator.dart
diff --git a/test/generated_sdk/lib/collection/iterator.dart b/test/generated_sdk/lib/collection/iterator.dart
deleted file mode 100644
index 1fe49cd2dc4d1ea84e27e2d2cbed7a9d7ae3003f..0000000000000000000000000000000000000000
--- a/test/generated_sdk/lib/collection/iterator.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart.collection;
-
-/**
- * The [HasNextIterator] class wraps an [Iterator] and provides methods to
- * iterate over an object using `hasNext` and `next`.
- *
- * An [HasNextIterator] does not implement the [Iterator] interface.
- */
-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() {
- // Call to hasNext is necessary to make sure we are positioned at the first
- // element when we start iterating.
- if (!hasNext) throw new StateError("No more elements");
- assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT);
- E result = _iterator.current;
- _move();
- return result;
- }
-
- void _move() {
- if (_iterator.moveNext()) {
- _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
- } else {
- _state = _NO_NEXT;
- }
- }
-}
« no previous file with comments | « test/generated_sdk/lib/collection/iterable.dart ('k') | test/generated_sdk/lib/collection/linked_hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698