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

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

Issue 13851022: Make mock behaviors be ordered. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | pkg/unittest/test/mock_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/mock.dart
===================================================================
--- pkg/unittest/lib/mock.dart (revision 22128)
+++ pkg/unittest/lib/mock.dart (working copy)
@@ -108,6 +108,7 @@
library mock;
import 'dart:mirrors' show MirrorSystem;
+import 'dart:collection' show LinkedHashMap;
import 'matcher.dart';
@@ -1237,7 +1238,7 @@
final String name;
/** The set of [Behavior]s supported. */
- Map<String,Behavior> _behaviors;
+ LinkedHashMap<String,Behavior> _behaviors;
/** The [log] of calls made. Only used if [name] is null. */
LogEntryList log;
@@ -1262,7 +1263,7 @@
*/
Mock() : _throwIfNoBehavior = false, log = null, name = null {
logging = true;
- _behaviors = new Map<String,Behavior>();
+ _behaviors = new LinkedHashMap<String,Behavior>();
}
/**
@@ -1281,7 +1282,7 @@
throw new Exception("Mocks with shared logs must have a name.");
}
logging = enableLogging;
- _behaviors = new Map<String,Behavior>();
+ _behaviors = new LinkedHashMap<String,Behavior>();
}
/**
« no previous file with comments | « no previous file | pkg/unittest/test/mock_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698