| Index: sdk/lib/_internal/pub/test/pubspec_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/pubspec_test.dart b/sdk/lib/_internal/pub/test/pubspec_test.dart
|
| index a730a14b514d98eb0fe02da7ee9f42b578d517c0..b8c42f6f4fc7fad6af75488d960676f0fcaf3fd5 100644
|
| --- a/sdk/lib/_internal/pub/test/pubspec_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/pubspec_test.dart
|
| @@ -4,8 +4,11 @@
|
|
|
| library pubspec_test;
|
|
|
| +import 'dart:async';
|
| +
|
| import 'package:unittest/unittest.dart';
|
|
|
| +import '../lib/src/package.dart';
|
| import '../lib/src/pubspec.dart';
|
| import '../lib/src/source.dart';
|
| import '../lib/src/source_registry.dart';
|
| @@ -14,12 +17,25 @@ 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, description,
|
| {bool fromLockFile: false}) {
|
| if (description != 'ok') throw new FormatException('Bad');
|
| return description;
|
| }
|
| +
|
| + bool descriptionsEqual(description1, description2) =>
|
| + description1 == description2;
|
| +
|
| String packageName(description) => 'foo';
|
| }
|
|
|
|
|