Index: packages/package_config/test/discovery_test.dart |
diff --git a/packages/package_config/test/discovery_test.dart b/packages/package_config/test/discovery_test.dart |
index 897063f52726e5b5f0c88f0417d3d681c5b46c47..6a5bcdee91b156a079ce3e86ca40dfea4b436b6f 100644 |
--- a/packages/package_config/test/discovery_test.dart |
+++ b/packages/package_config/test/discovery_test.dart |
@@ -41,7 +41,7 @@ void validatePackagesDir(Packages resolver, Uri location) { |
if (location.scheme == "file") { |
expect(resolver.packages, unorderedEquals(["foo", "bar", "baz"])); |
} else { |
- expect(() => resolver.packages, throws); |
+ expect(() => resolver.packages, throwsUnsupportedError); |
} |
} |
@@ -169,6 +169,7 @@ main() { |
} |
throw "not found"; |
} |
+ |
// A non-file: location with no .packages or packages/: |
// Assumes a packages dir exists, and resolves relative to that. |
Packages resolver; |
@@ -189,6 +190,7 @@ main() { |
Future<List<int>> loader(Uri file) async { |
throw "not found"; |
} |
+ |
// A non-file: location with no .packages or packages/: |
// Assumes a packages dir exists, and resolves relative to that. |
Packages resolver; |
@@ -228,13 +230,16 @@ main() { |
generalTest("loadPackagesFile not found", {}, (Uri directory) async { |
Uri file = directory.resolve(".packages"); |
- expect(loadPackagesFile(file), throws); |
+ expect( |
+ loadPackagesFile(file), |
+ throwsA(anyOf(new isInstanceOf<FileSystemException>(), |
+ new isInstanceOf<HttpException>()))); |
}); |
generalTest("loadPackagesFile syntax error", {".packages": "syntax error"}, |
(Uri directory) async { |
Uri file = directory.resolve(".packages"); |
- expect(loadPackagesFile(file), throws); |
+ expect(loadPackagesFile(file), throwsFormatException); |
}); |
generalTest("getPackagesDir", { |