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

Unified Diff: test/version_solver_test.dart

Issue 1528523003: Clean up the semantics of package descriptions. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years 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 | « test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/version_solver_test.dart
diff --git a/test/version_solver_test.dart b/test/version_solver_test.dart
index 5239bf6bf060bca1cfc6864838405e61990083af..f4a24651545d27ff6b9e3274fbbec85c86a1c900 100644
--- a/test/version_solver_test.dart
+++ b/test/version_solver_test.dart
@@ -1387,8 +1387,11 @@ class MockSource extends CachedSource {
MockSource(this.name);
- dynamic parseDescription(String containingPath, description,
- {bool fromLockFile: false}) => description;
+ PackageRef parseRef(String name, description, {String containingPath}) =>
+ new PackageRef(name, this.name, description);
+
+ PackageId parseId(String name, Version version, description) =>
+ new PackageId(name, this.name, version, description);
bool descriptionsEqual(description1, description2) =>
description1 == description2;
@@ -1398,7 +1401,7 @@ class MockSource extends CachedSource {
Future<List<PackageId>> doGetVersions(PackageRef ref) async {
// Make sure the solver doesn't request the same thing twice.
if (_requestedVersions.contains(ref.description)) {
- throw new Exception('Version list for $description was already '
+ throw new Exception('Version list for ${ref.description} was already '
'requested.');
}
@@ -1409,8 +1412,10 @@ class MockSource extends CachedSource {
'"${ref.description}".');
}
- return _packages[ref.description].values
- .map((package) => ref.atVersion(package.version)).toList();
+ return _packages[ref.description].values.map((package) {
+ return new PackageId(
+ ref.name, this.name, package.version, ref.description);
+ }).toList();
}
Future<Pubspec> describeUncached(PackageId id) {
« no previous file with comments | « test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698