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

Unified Diff: sdk/lib/_internal/pub/test/utils_test.dart

Issue 16039002: Handle empty maps when converting YAML to a string. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/utils_test.dart
diff --git a/sdk/lib/_internal/pub/test/utils_test.dart b/sdk/lib/_internal/pub/test/utils_test.dart
index c1c29a811c73e894f7ef9fa3ca36525bfdf93036..a137d2d079094cfa0ad8429dec33f37955513b1e 100644
--- a/sdk/lib/_internal/pub/test/utils_test.dart
+++ b/sdk/lib/_internal/pub/test/utils_test.dart
@@ -80,5 +80,12 @@ no: 1
null: null
true: bool"""));
});
+
+ test('handles empty maps', () {
+ expect(yamlToString({}), equals("{}"));
+ expect(yamlToString({'a': {}, 'b': {}}), equals("""
+a: {}
+b: {}"""));
+ });
});
}
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698