Index: pkg/analyzer/lib/src/generated/source_io.dart |
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart |
index a5b4347d78c0bac7bca553dceba28e2b289a6c0c..08c3b6ae9d225ac970234a3313d067543025df3c 100644 |
--- a/pkg/analyzer/lib/src/generated/source_io.dart |
+++ b/pkg/analyzer/lib/src/generated/source_io.dart |
@@ -345,6 +345,18 @@ class PackageUriResolver extends UriResolver { |
} |
} |
+ /** |
+ * If the list of package directories contains one element, return it. |
+ * Otherwise raise an exception. Intended for testing. |
+ */ |
+ String get packagesDirectory_forTesting { |
+ int length = _packagesDirectories.length; |
+ if (length != 1) { |
+ throw new Exception('Expected 1 package directory, found $length'); |
+ } |
+ return _packagesDirectories[0].getPath(); |
+ } |
+ |
@override |
Source resolveAbsolute(Uri uri) { |
if (!isPackageUri(uri)) { |