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

Unified Diff: pkg/unittest/lib/mock.dart

Issue 16408019: Improved error messages from unittest. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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: pkg/unittest/lib/mock.dart
===================================================================
--- pkg/unittest/lib/mock.dart (revision 24002)
+++ pkg/unittest/lib/mock.dart (working copy)
@@ -288,7 +288,7 @@
* if it matches this [CallMatcher.
*/
bool matches(String method, List arguments) {
- var matchState = new MatchState();
+ var matchState = {};
if (!nameFilter.matches(method, matchState)) {
return false;
}
@@ -541,7 +541,7 @@
Function entryFilter = _makePredicate(logFilter);
String filterName = _qualifiedName(mockNameFilter, logFilter.toString());
LogEntryList rtn = new LogEntryList(filterName);
- MatchState matchState = new MatchState();
+ var matchState = {};
for (var i = 0; i < logs.length; i++) {
LogEntry entry = logs[i];
if (mockNameFilter.matches(entry.mockName, matchState) &&

Powered by Google App Engine
This is Rietveld 408576698