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

Unified Diff: lib/unittest/core_matchers.dart

Issue 10545114: Removes constructor initializer in named parameter of private member (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: # Created 8 years, 6 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: lib/unittest/core_matchers.dart
diff --git a/lib/unittest/core_matchers.dart b/lib/unittest/core_matchers.dart
index 0826457617840221aece57b3318b18e9efe63d99..4e571109c109580181637212a25bf5e07e056dfb 100644
--- a/lib/unittest/core_matchers.dart
+++ b/lib/unittest/core_matchers.dart
@@ -118,7 +118,7 @@ class _IsAnything extends BaseMatcher {
*/
class isInstanceOf<T> extends BaseMatcher {
final String _name;
- const isInstanceOf([this._name = 'specified type']);
+ const isInstanceOf([name = 'specified type']) : this._name = name;
bool matches(obj) => obj is T;
// The description here is lame :-(
Description describe(Description description) =>
@@ -158,7 +158,7 @@ final Matcher returnsNormally = const _ReturnsNormally();
class _Throws extends BaseMatcher {
final Matcher _matcher;
- const _Throws([Matcher this._matcher = null]);
+ const _Throws([Matcher matcher = null]) : this._matcher = matcher;
bool matches(item) {
try {
@@ -255,7 +255,7 @@ Matcher hasLength(matcher) =>
class _HasLength extends BaseMatcher {
final Matcher _matcher;
- const _HasLength([Matcher this._matcher = null]);
+ const _HasLength([Matcher matcher = null]) : this._matcher = matcher;
bool matches(item) {
return _matcher.matches(item.length);
@@ -325,7 +325,7 @@ class _DeepMatcher extends BaseMatcher {
final int _limit;
var count;
- _DeepMatcher(this._expected, [this._limit = 1000]);
+ _DeepMatcher(this._expected, [limit = 1000]) : this._limit = limit;
String _recursiveMatch(expected, actual, String location) {
String reason = null;

Powered by Google App Engine
This is Rietveld 408576698