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

Unified Diff: pkg/matcher/test/test_common.dart

Issue 306283002: pkg/matcher: cleanup, updates, deprecations, fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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: pkg/matcher/test/test_common.dart
diff --git a/pkg/matcher/test/test_common.dart b/pkg/matcher/test/test_common.dart
index 562786dfa286477249a7091e7ca183c06a41bf34..93f45f33737c2a9c97334bf134bed6da8e96d58d 100644
--- a/pkg/matcher/test/test_common.dart
+++ b/pkg/matcher/test/test_common.dart
@@ -13,13 +13,13 @@ class Widget {
}
class HasPrice extends CustomMatcher {
- HasPrice(matcher) :
- super("Widget with a price that is", "price", matcher);
+ HasPrice(matcher) : super("Widget with a price that is", "price", matcher);
featureValueOf(actual) => actual.price;
}
-class SimpleIterable extends IterableBase {
- int count;
+class SimpleIterable extends IterableBase<int> {
+ final int count;
+
SimpleIterable(this.count);
bool contains(int val) => count < val ? false : true;
@@ -34,15 +34,15 @@ class SimpleIterable extends IterableBase {
String toString() => "<[$count]>";
Iterator get iterator {
- return new SimpleIterator(count);
+ return new _SimpleIterator(count);
}
}
-class SimpleIterator implements Iterator {
+class _SimpleIterator implements Iterator<int> {
int _count;
int _current;
- SimpleIterator(this._count);
+ _SimpleIterator(this._count);
bool moveNext() {
if (_count > 0) {
@@ -54,6 +54,6 @@ class SimpleIterator implements Iterator {
return false;
}
- get current => _current;
+ int get current => _current;
}

Powered by Google App Engine
This is Rietveld 408576698