a few more strong-mode fixes
R=nweiz@google.com
Review URL: https://codereview.chromium.org//1827353003 .
diff --git a/pubspec.yaml b/pubspec.yaml
index 3697fe6..e5b13cc 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,8 @@
name: matcher
-version: 0.12.0+2
+
+# This version should really be 0.12.1-dev, but test depends on matcher <0.12.1,
+# so we're using + instead.
+version: 0.12.0+dev
author: Dart Team <misc@dartlang.org>
description: Support for specifying test expectations
homepage: https://github.com/dart-lang/matcher
diff --git a/test/pretty_print_test.dart b/test/pretty_print_test.dart
index c71a94f..551db45 100644
--- a/test/pretty_print_test.dart
+++ b/test/pretty_print_test.dart
@@ -120,7 +120,7 @@
});
test("that's recursive", () {
- var list = [1, 2, 3];
+ var list = <dynamic>[1, 2, 3];
list.add(list);
expect(prettyPrint(list), equals("[1, 2, 3, (recursive)]"));
});
diff --git a/test/test_utils.dart b/test/test_utils.dart
index ffcb623..a0dad48 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 @@
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> {