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

Unified Diff: pkg/analyzer/test/generated/java_io_test.dart

Issue 2386123004: Remove JavaFile.pathContext (Closed)
Patch Set: Created 4 years, 2 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 | « pkg/analyzer/lib/src/generated/source_io.dart ('k') | pkg/analyzer/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/java_io_test.dart
diff --git a/pkg/analyzer/test/generated/java_io_test.dart b/pkg/analyzer/test/generated/java_io_test.dart
index 03168172d043bcd3849e75bc82d521b2dcaa0c1f..ca2f62747185151252578156c5f178159f3c8f29 100644
--- a/pkg/analyzer/test/generated/java_io_test.dart
+++ b/pkg/analyzer/test/generated/java_io_test.dart
@@ -5,6 +5,7 @@
library analyzer.test.generated.java_io_test;
import 'package:analyzer/src/generated/java_io.dart';
+import 'package:path/path.dart' as path;
import 'package:unittest/unittest.dart';
import '../utils.dart';
@@ -15,24 +16,24 @@ main() {
group('toURI', () {
test('forAbsolute', () {
String tempPath = '/temp';
- String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
+ String absolutePath = path.context.join(tempPath, 'foo.dart');
// we use an absolute path
- expect(JavaFile.pathContext.isAbsolute(path), isTrue,
- reason: '"$path" is not absolute');
+ expect(path.context.isAbsolute(absolutePath), isTrue,
+ reason: '"$absolutePath" is not absolute');
// test that toURI() returns an absolute URI
- Uri uri = new JavaFile(path).toURI();
+ Uri uri = new JavaFile(absolutePath).toURI();
expect(uri.isAbsolute, isTrue);
expect(uri.scheme, 'file');
});
test('forRelative', () {
String tempPath = '/temp';
- String path = JavaFile.pathContext.join(tempPath, 'foo.dart');
- expect(JavaFile.pathContext.isAbsolute(path), isTrue,
- reason: '"$path" is not absolute');
+ String absolutePath = path.context.join(tempPath, 'foo.dart');
+ expect(path.context.isAbsolute(absolutePath), isTrue,
+ reason: '"$absolutePath" is not absolute');
// prepare a relative path
// We should not check that "relPath" is actually relative -
// it may be not on Windows, if "temp" is on other disk.
- String relPath = JavaFile.pathContext.relative(path);
+ String relPath = path.context.relative(absolutePath);
// test that toURI() returns an absolute URI
Uri uri = new JavaFile(relPath).toURI();
expect(uri.isAbsolute, isTrue);
« no previous file with comments | « pkg/analyzer/lib/src/generated/source_io.dart ('k') | pkg/analyzer/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698