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

Side by Side Diff: lib/unittest/numeric_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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/unittest/core_matchers.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Returns a matcher which matches if the match argument is greater 6 * Returns a matcher which matches if the match argument is greater
7 * than the given [value]. 7 * than the given [value].
8 */ 8 */
9 Matcher greaterThan(value) => 9 Matcher greaterThan(value) =>
10 new _OrderingComparison(value, false, false, true, 'a value greater than'); 10 new _OrderingComparison(value, false, false, true, 'a value greater than');
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 final String _comparisonDescription; 88 final String _comparisonDescription;
89 /** Whether to include the expected value in the description */ 89 /** Whether to include the expected value in the description */
90 final bool _valueInDescription; 90 final bool _valueInDescription;
91 91
92 const _OrderingComparison( 92 const _OrderingComparison(
93 this._value, 93 this._value,
94 this._equalValue, 94 this._equalValue,
95 this._lessThanValue, 95 this._lessThanValue,
96 this._greaterThanValue, 96 this._greaterThanValue,
97 this._comparisonDescription, 97 this._comparisonDescription,
98 [this._valueInDescription = true]); 98 [valueInDescription = true]) : this._valueInDescription = valueInDescription ;
Ivan Posva 2012/06/12 10:43:05 Long line?
99 99
100 bool matches(item) { 100 bool matches(item) {
101 if (item == _value) { 101 if (item == _value) {
102 return _equalValue; 102 return _equalValue;
103 } else if (item < _value) { 103 } else if (item < _value) {
104 return _lessThanValue; 104 return _lessThanValue;
105 } else { 105 } else {
106 return _greaterThanValue; 106 return _greaterThanValue;
107 } 107 }
108 } 108 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (item is !num) { 216 if (item is !num) {
217 return mismatchDescription. 217 return mismatchDescription.
218 addDescriptionOf(item). 218 addDescriptionOf(item).
219 add(' not numeric'); 219 add(' not numeric');
220 } else { 220 } else {
221 return super.describeMismatch(item, mismatchDescription); 221 return super.describeMismatch(item, mismatchDescription);
222 } 222 }
223 } 223 }
224 } 224 }
225 225
OLDNEW
« no previous file with comments | « lib/unittest/core_matchers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698