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

Unified Diff: utils/tests/pub/pubspec_test.dart

Issue 11361201: Allow an empty "dependencies" key in a pubspec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « utils/pub/pubspec.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/pubspec_test.dart
diff --git a/utils/tests/pub/pubspec_test.dart b/utils/tests/pub/pubspec_test.dart
index d93a408708371a2bf26f646e3c6f0c793396342e..92976e8c1979114885a3f7f81820ab52f202c68b 100644
--- a/utils/tests/pub/pubspec_test.dart
+++ b/utils/tests/pub/pubspec_test.dart
@@ -41,6 +41,14 @@ dependencies:
expect(foo.constraint.allows(new Version(3, 4, 5)), isFalse);
});
+ test("allows an empty dependencies map", () {
+ var pubspec = new Pubspec.parse('''
+dependencies:
+''', sources);
+
+ expect(pubspec.dependencies, isEmpty);
+ });
+
test("throws if the description isn't valid", () {
expect(() {
new Pubspec.parse('''
« no previous file with comments | « utils/pub/pubspec.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698