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

Unified Diff: packages/package_config/test/discovery_test.dart

Issue 3015713002: Roll to pickup pool changes
Patch Set: Created 3 years, 3 months 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
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", {
« no previous file with comments | « packages/package_config/test/discovery_analysis_test.dart ('k') | packages/package_config/test/parse_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698