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

Unified Diff: test/test_utils.dart

Issue 1827353003: pkg/matcher: a few more strong-mode fixes (Closed) Base URL: https://github.com/dart-lang/matcher.git@master
Patch Set: nit Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/pretty_print_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_utils.dart
diff --git a/test/test_utils.dart b/test/test_utils.dart
index ffcb623be4411824d44e536becb7a315fc7012b0..a0dad48b3faa02734f52821e77fc1ef2c07af52d 100644
--- a/test/test_utils.dart
+++ b/test/test_utils.dart
@@ -2,8 +2,6 @@
// 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.
-import 'dart:collection';
-
import 'package:test/test.dart';
void shouldFail(value, Matcher matcher, expected) {
@@ -43,25 +41,12 @@ class HasPrice extends CustomMatcher {
featureValueOf(actual) => actual.price;
}
-class SimpleIterable extends IterableBase<int> {
+class SimpleIterable extends Iterable<int> {
final int count;
SimpleIterable(this.count);
- bool contains(int val) => count < val ? false : true;
-
- bool any(bool f(element)) {
- for (var i = 0; i <= count; i++) {
- if (f(i)) return true;
- }
- return false;
- }
-
- String toString() => "<[$count]>";
-
- Iterator get iterator {
- return new _SimpleIterator(count);
- }
+ Iterator<int> get iterator => new _SimpleIterator(count);
}
class _SimpleIterator implements Iterator<int> {
« no previous file with comments | « test/pretty_print_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698