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

Unified Diff: pkg/analysis_server/test/abstract_context.dart

Issue 2420413004: Fixes for tests on windows (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/abstract_context.dart
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index d7b70df08d693b5226efc9cb0609d4cb6dae84c4..2b7a648a1351c60fd68b2ea1cfaba52a779ed838 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -49,13 +49,13 @@ class AbstractContextTest {
AnalysisContext context;
Source addPackageSource(String packageName, String filePath, String content) {
- packageMap[packageName] = [(provider.newFolder('/pubcache/$packageName'))];
- File file = provider.newFile('/pubcache/$packageName/$filePath', content);
+ packageMap[packageName] = [(newFolder('/pubcache/$packageName'))];
+ File file = newFile('/pubcache/$packageName/$filePath', content);
return file.createSource();
}
Source addSource(String path, String content, [Uri uri]) {
- File file = provider.newFile(path, content);
+ File file = newFile(path, content);
Source source = file.createSource(uri);
ChangeSet changeSet = new ChangeSet();
changeSet.addedSource(source);
@@ -64,6 +64,12 @@ class AbstractContextTest {
return source;
}
+ File newFile(String path, [String content]) =>
+ provider.newFile(provider.convertPath(path), content ?? '');
+
+ Folder newFolder(String path) =>
+ provider.newFolder(provider.convertPath(path));
+
/**
* Performs all analysis tasks in [context].
*/
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698