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

Side by Side Diff: pkg/mock/lib/src/result_set_matcher.dart

Issue 278613003: pkg/mock: fixes for v0.11 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: status file fix for mismatched version constraints 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/mock/lib/src/result_matcher.dart ('k') | pkg/mock/pubspec.yaml » ('j') | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library mock.result_set_matcher; 5 library mock.result_set_matcher;
6 6
7 import 'package:matcher/matcher.dart'; 7 import 'package:matcher/matcher.dart';
8 8
9 import 'action.dart'; 9 import 'action.dart';
10 import 'log_entry.dart'; 10 import 'log_entry.dart';
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 Map matchState, bool verbose) { 85 Map matchState, bool verbose) {
86 if (frequency != _Frequency.SOME) { 86 if (frequency != _Frequency.SOME) {
87 LogEntry entry = matchState['entry']; 87 LogEntry entry = matchState['entry'];
88 if (entry.action == Action.RETURN || entry.action == Action.PROXY) { 88 if (entry.action == Action.RETURN || entry.action == Action.PROXY) {
89 mismatchDescription.add('returned'); 89 mismatchDescription.add('returned');
90 } else { 90 } else {
91 mismatchDescription.add('threw'); 91 mismatchDescription.add('threw');
92 } 92 }
93 mismatchDescription.add(' value that '); 93 mismatchDescription.add(' value that ');
94 value.describeMismatch(entry.value, mismatchDescription, 94 value.describeMismatch(entry.value, mismatchDescription,
95 matchState['state'], verbose); 95 matchState['state'], verbose);
96 mismatchDescription.add(' at least once'); 96 mismatchDescription.add(' at least once');
97 } else { 97 } else {
98 mismatchDescription.add('never did'); 98 mismatchDescription.add('never did');
99 } 99 }
100 return mismatchDescription; 100 return mismatchDescription;
101 } 101 }
102 } 102 }
103 103
104 /** 104 /**
105 *[alwaysReturned] asserts that all matching calls to a method returned 105 *[alwaysReturned] asserts that all matching calls to a method returned
(...skipping 29 matching lines...) Expand all
135 */ 135 */
136 Matcher sometimeThrew(value) => 136 Matcher sometimeThrew(value) =>
137 new _ResultSetMatcher(Action.THROW, wrapMatcher(value), _Frequency.SOME); 137 new _ResultSetMatcher(Action.THROW, wrapMatcher(value), _Frequency.SOME);
138 138
139 /** 139 /**
140 *[neverThrew] asserts that no matching call to a method threw 140 *[neverThrew] asserts that no matching call to a method threw
141 * a value that matched [value]. 141 * a value that matched [value].
142 */ 142 */
143 Matcher neverThrew(value) => 143 Matcher neverThrew(value) =>
144 new _ResultSetMatcher(Action.THROW, wrapMatcher(value), _Frequency.NONE); 144 new _ResultSetMatcher(Action.THROW, wrapMatcher(value), _Frequency.NONE);
OLDNEW
« no previous file with comments | « pkg/mock/lib/src/result_matcher.dart ('k') | pkg/mock/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698