pkg/matcher: small nits from previous CL
R=sigmund@google.com
Review URL: https://codereview.chromium.org//302093013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart/pkg/matcher@36896 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e4ff62..88aa966 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.10.0+2
+
+* Added types to a number of constants.
+
## 0.10.0+1
* Matchers related to bad language use have been removed. These represent code
diff --git a/README.md b/README.md
index a69bbdd..cf165c1 100644
--- a/README.md
+++ b/README.md
@@ -4,5 +4,4 @@
inspiration from [Hamcrest](http://code.google.com/p/hamcrest/).
For more information, see
-[Unit Testing with Dart]
-(http://www.dartlang.org/articles/dart-unit-tests/).
+[Unit Testing with Dart](http://www.dartlang.org/articles/dart-unit-tests/).
diff --git a/lib/src/core_matchers.dart b/lib/src/core_matchers.dart
index 64eb761..356476b 100644
--- a/lib/src/core_matchers.dart
+++ b/lib/src/core_matchers.dart
@@ -96,7 +96,7 @@
final int _limit;
var count;
- _DeepMatcher(this._expected, [limit = 1000]) : this._limit = limit;
+ _DeepMatcher(this._expected, [int limit = 1000]) : this._limit = limit;
// Returns a pair (reason, location)
List _compareIterables(expected, actual, matcher, depth, location) {
@@ -513,10 +513,8 @@
Description describe(Description description) => description.add(_name);
}
-
-
/// A matcher for Map types.
-const isMap = const _IsMap();
+const Matcher isMap = const _IsMap();
class _IsMap extends TypeMatcher {
const _IsMap() : super("Map");
@@ -524,7 +522,7 @@
}
/// A matcher for List types.
-const isList = const _IsList();
+const Matcher isList = const _IsList();
class _IsList extends TypeMatcher {
const _IsList() : super("List");
@@ -615,7 +613,6 @@
Matcher isIn(expected) => new _In(expected);
class _In extends Matcher {
-
final _expected;
const _In(this._expected);
diff --git a/lib/src/error_matchers.dart b/lib/src/error_matchers.dart
index b50f766..8418e0d 100644
--- a/lib/src/error_matchers.dart
+++ b/lib/src/error_matchers.dart
@@ -9,7 +9,7 @@
/// A matcher for AbstractClassInstantiationError.
@deprecated
-const isAbstractClassInstantiationError =
+const Matcher isAbstractClassInstantiationError =
const _AbstractClassInstantiationError();
/// A matcher for functions that throw AbstractClassInstantiationError.
@@ -24,7 +24,7 @@
}
/// A matcher for ArgumentErrors.
-const isArgumentError = const _ArgumentError();
+const Matcher isArgumentError = const _ArgumentError();
/// A matcher for functions that throw ArgumentError.
const Matcher throwsArgumentError = const Throws(isArgumentError);
@@ -35,7 +35,8 @@
}
/// A matcher for ConcurrentModificationError.
-const isConcurrentModificationError = const _ConcurrentModificationError();
+const Matcher isConcurrentModificationError =
+ const _ConcurrentModificationError();
/// A matcher for functions that throw ConcurrentModificationError.
const Matcher throwsConcurrentModificationError =
@@ -47,7 +48,7 @@
}
/// A matcher for CyclicInitializationError.
-const isCyclicInitializationError = const _CyclicInitializationError();
+const Matcher isCyclicInitializationError = const _CyclicInitializationError();
/// A matcher for functions that throw CyclicInitializationError.
const Matcher throwsCyclicInitializationError =
@@ -59,7 +60,7 @@
}
/// A matcher for Exceptions.
-const isException = const _Exception();
+const Matcher isException = const _Exception();
/// A matcher for functions that throw Exception.
const Matcher throwsException = const Throws(isException);
@@ -71,7 +72,7 @@
/// A matcher for FallThroughError.
@deprecated
-const isFallThroughError = const _FallThroughError();
+const Matcher isFallThroughError = const _FallThroughError();
/// A matcher for functions that throw FallThroughError.
@deprecated
@@ -83,7 +84,7 @@
}
/// A matcher for FormatExceptions.
-const isFormatException = const _FormatException();
+const Matcher isFormatException = const _FormatException();
/// A matcher for functions that throw FormatException.
const Matcher throwsFormatException = const Throws(isFormatException);
@@ -94,7 +95,7 @@
}
/// A matcher for NoSuchMethodErrors.
-const isNoSuchMethodError = const _NoSuchMethodError();
+const Matcher isNoSuchMethodError = const _NoSuchMethodError();
/// A matcher for functions that throw NoSuchMethodError.
const Matcher throwsNoSuchMethodError = const Throws(isNoSuchMethodError);
@@ -105,7 +106,7 @@
}
/// A matcher for NullThrownError.
-const isNullThrownError = const _NullThrownError();
+const Matcher isNullThrownError = const _NullThrownError();
/// A matcher for functions that throw NullThrownError.
const Matcher throwsNullThrownError = const Throws(isNullThrownError);
@@ -116,7 +117,7 @@
}
/// A matcher for RangeErrors.
-const isRangeError = const _RangeError();
+const Matcher isRangeError = const _RangeError();
/// A matcher for functions that throw RangeError.
const Matcher throwsRangeError = const Throws(isRangeError);
@@ -127,7 +128,7 @@
}
/// A matcher for StateErrors.
-const isStateError = const _StateError();
+const Matcher isStateError = const _StateError();
/// A matcher for functions that throw StateError.
const Matcher throwsStateError = const Throws(isStateError);
@@ -138,7 +139,7 @@
}
/// A matcher for UnimplementedErrors.
-const isUnimplementedError = const _UnimplementedError();
+const Matcher isUnimplementedError = const _UnimplementedError();
/// A matcher for functions that throw Exception.
const Matcher throwsUnimplementedError = const Throws(isUnimplementedError);
@@ -149,7 +150,7 @@
}
/// A matcher for UnsupportedError.
-const isUnsupportedError = const _UnsupportedError();
+const Matcher isUnsupportedError = const _UnsupportedError();
/// A matcher for functions that throw UnsupportedError.
const Matcher throwsUnsupportedError = const Throws(isUnsupportedError);
diff --git a/pubspec.yaml b/pubspec.yaml
index f6331af..e487837 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: matcher
-version: 0.10.0+1
+version: 0.10.0+2
author: Dart Team <misc@dartlang.org>
description: Support for specifying test expectations
homepage: http://www.dartlang.org