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

Unified Diff: test/package_root_info_test.dart

Issue 2268153003: Fix a crash. (Closed) Base URL: git@github.com:dart-lang/package_resolver@master
Patch Set: Code review changes Created 4 years, 4 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
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/package_root_info_test.dart
diff --git a/test/package_root_info_test.dart b/test/package_root_info_test.dart
index c0edba6e5d67fc3666e6f53a3bcb0867a7107798..f05f20c10376f0d3f5e918d0dc3823b279609ed0 100644
--- a/test/package_root_info_test.dart
+++ b/test/package_root_info_test.dart
@@ -22,6 +22,12 @@ void main() {
expect(resolver.packageRoot, equals(Uri.parse("file:///foo/bar/")));
});
+ test("with a URI without a path component", () {
+ var resolver =
+ new SyncPackageResolver.root(Uri.parse("http://localhost:1234"));
+ expect(resolver.packageRoot, equals(Uri.parse("http://localhost:1234/")));
+ });
+
test("with an invalid URI type", () {
expect(() => new SyncPackageResolver.root(12), throwsArgumentError);
});
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698