Index: utils/tests/pub/version_solver_test.dart |
diff --git a/utils/tests/pub/version_solver_test.dart b/utils/tests/pub/version_solver_test.dart |
index e055e36a022d5693c675b5411936855603429924..2ffc0ff6a1a099de3893936ed44d777906a7596e 100644 |
--- a/utils/tests/pub/version_solver_test.dart |
+++ b/utils/tests/pub/version_solver_test.dart |
@@ -192,7 +192,11 @@ testResolve(description, packages, [result, error]) { |
var name = parts[0]; |
var version = parts[1]; |
var package = source.mockPackage(name, version, dependencies); |
- if (name == 'myapp') root = package; |
+ if (name == 'myapp') { |
+ root = package; |
Bob Nystrom
2012/06/26 23:39:09
Can you add a comment here that we specifically do
nweiz
2012/06/27 18:05:12
Done.
|
+ } else { |
+ source.addPackage(package); |
+ } |
}); |
// Clean up the expectation. |
@@ -260,10 +264,12 @@ class MockSource extends Source { |
}); |
var pubspec = new Pubspec(new Version.parse(version), dependencies); |
- var package = new Package.inMemory(name, pubspec); |
+ return new Package.inMemory(name, pubspec); |
+ } |
- _packages.putIfAbsent(name, () => new Map<Version, Package>()); |
- _packages[name][package.version] = package; |
+ void addPackage(Package package) { |
+ _packages.putIfAbsent(package.name, () => new Map<Version, Package>()); |
+ _packages[package.name][package.version] = package; |
return package; |
} |
} |