Index: sdk/lib/_internal/pub/test/lock_file_test.dart |
diff --git a/sdk/lib/_internal/pub/test/lock_file_test.dart b/sdk/lib/_internal/pub/test/lock_file_test.dart |
index 29c9fcc569acf951d45eaadde30d53d577fc2019..f5cff29fe011ef9819d4f6b381f375cc2c4c1692 100644 |
--- a/sdk/lib/_internal/pub/test/lock_file_test.dart |
+++ b/sdk/lib/_internal/pub/test/lock_file_test.dart |
@@ -4,11 +4,14 @@ |
library lock_file_test; |
+import 'dart:async'; |
+ |
import 'package:unittest/unittest.dart'; |
import 'package:yaml/yaml.dart'; |
import '../lib/src/lock_file.dart'; |
import '../lib/src/package.dart'; |
+import '../lib/src/pubspec.dart'; |
import '../lib/src/source.dart'; |
import '../lib/src/source_registry.dart'; |
import '../lib/src/version.dart'; |
@@ -16,7 +19,15 @@ import 'test_pub.dart'; |
class MockSource extends Source { |
final String name = 'mock'; |
- final bool shouldCache = false; |
+ |
+ Future<Pubspec> onDescribe(PackageId id) => throw new UnsupportedError( |
+ "Cannot describe mock packages."); |
+ |
+ Future<bool> get(PackageId id, String path) => throw new UnsupportedError( |
+ "Cannot get a mock package."); |
+ |
+ Future<String> getDirectory(PackageId id) => throw new UnsupportedError( |
+ "Cannot get the directory for mock packages."); |
dynamic parseDescription(String filePath, String description, |
{bool fromLockFile: false}) { |
@@ -24,6 +35,9 @@ class MockSource extends Source { |
return description; |
} |
+ bool descriptionsEqual(description1, description2) => |
+ description1 == description2; |
+ |
String packageName(String description) { |
// Strip off ' desc'. |
return description.substring(0, description.length - 5); |