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

Unified Diff: pkg/unittest/mock.dart

Issue 11194025: Second round of cleanups for new optional parameter semantics. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/mock.dart
===================================================================
--- pkg/unittest/mock.dart (revision 13712)
+++ pkg/unittest/mock.dart (working copy)
@@ -829,10 +829,10 @@
* distance: 3).toString());
*/
LogEntryList preceding(LogEntryList keys,
- [mockNameFilter = null,
- logFilter = null,
- int distance = 1,
- bool includeKeys = false]) =>
+ {mockNameFilter: null,
+ logFilter: null,
+ int distance: 1,
+ bool includeKeys: false}) =>
_neighboring(true, keys, mockNameFilter, logFilter,
distance, includeKeys);
@@ -846,10 +846,10 @@
* See [preceding] for a usage example.
*/
LogEntryList following(LogEntryList keys,
- [mockNameFilter = null,
- logFilter = null,
- int distance = 1,
- bool includeKeys = false]) =>
+ {mockNameFilter: null,
+ logFilter: null,
+ int distance: 1,
+ bool includeKeys: false}) =>
_neighboring(false, keys, mockNameFilter, logFilter,
distance, includeKeys);
}
@@ -1236,10 +1236,10 @@
* If [enableLogging] is false, no logging will be done initially (whether
* or not a [log] is supplied), but [logging] can be set to true later.
*/
- Mock.custom([this.name,
+ Mock.custom({this.name,
this.log,
- throwIfNoBehavior = false,
- enableLogging = true]) : _throwIfNoBehavior = throwIfNoBehavior {
+ throwIfNoBehavior: false,
+ enableLogging: true}) : _throwIfNoBehavior = throwIfNoBehavior {
if (log != null && name == null) {
throw new Exception("Mocks with shared logs must have a name.");
}

Powered by Google App Engine
This is Rietveld 408576698