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

Side by Side Diff: test/relative_test.dart

Issue 1235823009: Upgrade to the new test runner. (Closed) Base URL: git@github.com:dart-lang/path@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Test "relative" on all styles of path.Context, on all platforms. 5 // Test "relative" on all styles of path.Context, on all platforms.
6 6
7 import "package:unittest/unittest.dart"; 7 import "package:test/test.dart";
8 import "package:path/path.dart" as path; 8 import "package:path/path.dart" as path;
9 9
10 import "utils.dart"; 10 import "utils.dart";
11 11
12 void main() { 12 void main() {
13 test("test relative", () { 13 test("test relative", () {
14 relativeTest(new path.Context(style: path.Style.posix, current: '.'), '/'); 14 relativeTest(new path.Context(style: path.Style.posix, current: '.'), '/');
15 relativeTest(new path.Context(style: path.Style.posix, current: '/'), '/'); 15 relativeTest(new path.Context(style: path.Style.posix, current: '/'), '/');
16 relativeTest( 16 relativeTest(
17 new path.Context(style: path.Style.windows, current: r'd:\'), r'c:\'); 17 new path.Context(style: path.Style.windows, current: r'd:\'), r'c:\');
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Should always throw - no relative path can be constructed. 78 // Should always throw - no relative path can be constructed.
79 if (isRelative) { 79 if (isRelative) {
80 expect(() => context.relative('.', from: '..'), throwsPathException); 80 expect(() => context.relative('.', from: '..'), throwsPathException);
81 expect(() => context.relative('a/b', from: '../../d'), throwsPathException); 81 expect(() => context.relative('a/b', from: '../../d'), throwsPathException);
82 expect(() => context.relative('a/b', from: '${prefix}a/b'), 82 expect(() => context.relative('a/b', from: '${prefix}a/b'),
83 throwsPathException); 83 throwsPathException);
84 // An absolute path relative from a relative path returns the absolute path. 84 // An absolute path relative from a relative path returns the absolute path.
85 expectRelative('${prefix}a/b', '${prefix}a/b', 'c/d'); 85 expectRelative('${prefix}a/b', '${prefix}a/b', 'c/d');
86 } 86 }
87 } 87 }
OLDNEW
« no previous file with comments | « test/posix_test.dart ('k') | test/url_test.dart » ('j') | test/windows_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698