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

Unified Diff: pkg/analyzer/test/resource_utils.dart

Issue 1843473002: Sort analyzer sources (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove generated file and fix misplaced comments Created 4 years, 9 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/test/reflective_tests.dart ('k') | pkg/analyzer/test/source/embedder_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/resource_utils.dart
diff --git a/pkg/analyzer/test/resource_utils.dart b/pkg/analyzer/test/resource_utils.dart
index fdf1e5ac5009097fcee9bf70f9b4802f82fb13bb..b6a04a798ba1f857f6e1c849ac7813ce90c7dab5 100644
--- a/pkg/analyzer/test/resource_utils.dart
+++ b/pkg/analyzer/test/resource_utils.dart
@@ -32,6 +32,15 @@ void expectPosixPath(String posixPath) {
}
/**
+ * Translate the given posixPath to a file URI appropriate for the
+ * platform on which the tests are executing.
+ */
+String posixToOSFileUri(String posixPath) {
+ expectPosixPath(posixPath);
+ return isWindows ? 'file:///C:$posixPath' : 'file://$posixPath';
+}
+
+/**
* Translate the given posixPath to a path appropriate for the
* platform on which the tests are executing.
*/
@@ -48,15 +57,6 @@ String posixToOSPath(String posixPath) {
}
/**
- * Translate the given posixPath to a file URI appropriate for the
- * platform on which the tests are executing.
- */
-String posixToOSFileUri(String posixPath) {
- expectPosixPath(posixPath);
- return isWindows ? 'file:///C:$posixPath' : 'file://$posixPath';
-}
-
-/**
* A convenience utility for setting up a test [MemoryResourceProvider].
* All supplied paths are assumed to be in [path.posix] format
* and are automatically translated to [path.context].
@@ -96,6 +96,9 @@ class TestResourceProvider implements ResourceProvider {
AbsolutePathContext get absolutePathContext => _provider.absolutePathContext;
@override
+ path.Context get pathContext => _provider.pathContext;
+
+ @override
File getFile(String path) => _provider.getFile(_assertPath(path));
@override
@@ -108,9 +111,6 @@ class TestResourceProvider implements ResourceProvider {
Folder getStateLocation(String pluginId) =>
_provider.getStateLocation(pluginId);
- @override
- path.Context get pathContext => _provider.pathContext;
-
/**
* Assert that the given path is valid for the OS platform on which the
* tests are running.
« no previous file with comments | « pkg/analyzer/test/reflective_tests.dart ('k') | pkg/analyzer/test/source/embedder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698