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

Unified Diff: sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_for_dependency_test.dart

Issue 488323002: Make servePackages's contents argument saner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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: sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_for_dependency_test.dart
diff --git a/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_for_dependency_test.dart b/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_for_dependency_test.dart
index f25d4768d781664f257b6a2833da4c626a3e61a6..fdeb83e5ff7d0b64fff512929e728fb69b7ecfb6 100644
--- a/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_for_dependency_test.dart
+++ b/sdk/lib/_internal/pub/test/snapshot/upgrades_snapshot_for_dependency_test.dart
@@ -16,16 +16,20 @@ main() {
servePackages([
packageMap("foo", "1.2.3", {"bar": "any"}),
packageMap("bar", "1.2.3")
- ], contents: [
- d.dir("lib", [d.file("bar.dart", "final message = 'hello!';")]),
- d.dir("bin", [
- d.file("hello.dart", """
+ ], contents: {
+ 'foo-1.2.3': [
+ d.dir("bin", [
+ d.file("hello.dart", """
import 'package:bar/bar.dart';
void main() => print(message);
""")
- ])
- ]);
+ ])
+ ],
+ 'bar-1.2.3': [
+ d.dir("lib", [d.file("bar.dart", "final message = 'hello!';")])
+ ]
+ });
d.appDir({"foo": "any"}).create();
@@ -36,11 +40,12 @@ void main() => print(message);
]).validate();
servePackages([
- packageMap("foo", "1.2.3", {"bar": "any"}),
packageMap("bar", "1.2.4")
- ], contents: [
- d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]),
- ], replace: true);
+ ], contents: {
+ 'bar-1.2.4': [
+ d.dir("lib", [d.file("bar.dart", "final message = 'hello 2!';")]),
+ ]
+ });
pubUpgrade(output: contains("Precompiled foo:hello."));

Powered by Google App Engine
This is Rietveld 408576698