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

Unified Diff: lib/src/utils.dart

Issue 1097183003: Add an "onPlatform" parameter to test() and group(). (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 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 | « lib/src/runner/vm/isolate_test.dart ('k') | lib/test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 59edb66579950c17230e135aee3e08a945c8ead9..3b8111d0f379e9a1171f397c54c42e0984c937e8 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -98,6 +98,20 @@ List flatten(Iterable nested) {
return result;
}
+/// Returns a new map with all values in both [map1] and [map2].
+///
+/// If there are conflicting keys, [map2]'s value wins.
+Map mergeMaps(Map map1, Map map2) {
+ var result = {};
+ map1.forEach((key, value) {
+ result[key] = value;
+ });
+ map2.forEach((key, value) {
+ result[key] = value;
+ });
+ return result;
+}
+
/// Returns a sink that maps events sent to [original] using [fn].
StreamSink mapSink(StreamSink original, fn(event)) {
var controller = new StreamController(sync: true);
« no previous file with comments | « lib/src/runner/vm/isolate_test.dart ('k') | lib/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698