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

Unified Diff: test/pubspec_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/lock_file_test.dart ('k') | test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/pubspec_test.dart
diff --git a/test/pubspec_test.dart b/test/pubspec_test.dart
index 54be75b00828d696fecb537278380d6c4942f71b..d662fae119e19923e112723fa516a32c0dbaf77a 100644
--- a/test/pubspec_test.dart
+++ b/test/pubspec_test.dart
@@ -19,6 +19,9 @@ import 'test_pub.dart';
class MockSource extends Source {
final String name = "mock";
+ Future<List<PackageId>> doGetVersions(PackageRef ref) =>
+ throw new UnsupportedError("Cannot get mock package versions.");
+
Future<Pubspec> doDescribe(PackageId id) => throw new UnsupportedError(
"Cannot describe mock packages.");
@@ -28,12 +31,14 @@ class MockSource extends Source {
String getDirectory(PackageId id) => throw new UnsupportedError(
"Cannot get the directory for mock packages.");
- dynamic parseDescription(String filePath, description,
- {bool fromLockFile: false}) {
+ PackageRef parseRef(String name, description, {String containingPath}) {
if (description != 'ok') throw new FormatException('Bad');
- return description;
+ return 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;
« no previous file with comments | « test/lock_file_test.dart ('k') | test/upgrade/git/upgrade_to_nonexistent_pubspec_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698