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

Unified Diff: pkg/path/test/relative_test.dart

Issue 59483008: Add isWithin to pkg/path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month 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 | « pkg/path/test/posix_test.dart ('k') | pkg/path/test/url_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/path/test/relative_test.dart
diff --git a/pkg/path/test/relative_test.dart b/pkg/path/test/relative_test.dart
index b9cd254b2e46b348a7a7cdf4d39230184f45c81d..e9762f47c542d37b41f71b448e527926f23a8040 100644
--- a/pkg/path/test/relative_test.dart
+++ b/pkg/path/test/relative_test.dart
@@ -7,6 +7,8 @@
import "package:unittest/unittest.dart";
import "package:path/path.dart" as path;
+import "utils.dart";
+
void main() {
test("test relative", () {
relativeTest(new path.Builder(style: path.Style.posix, root: '.'), '/');
@@ -75,11 +77,11 @@ void relativeTest(path.Builder builder, String prefix) {
// Should always throw - no relative path can be constructed.
if (isRelative) {
- expect(() => builder.relative('.', from: '..'), throwsArgumentError);
+ expect(() => builder.relative('.', from: '..'), throwsPathException);
expect(() => builder.relative('a/b', from: '../../d'),
- throwsArgumentError);
+ throwsPathException);
expect(() => builder.relative('a/b', from: '${prefix}a/b'),
- throwsArgumentError);
+ throwsPathException);
// An absolute path relative from a relative path returns the absolute path.
expectRelative('${prefix}a/b', '${prefix}a/b', 'c/d');
}
« no previous file with comments | « pkg/path/test/posix_test.dart ('k') | pkg/path/test/url_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698