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

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

Issue 2518873002: Use an import prefix in the analysis server tests; this fixes some issues conflicting with the (Closed)
Patch Set: use path prefix Created 4 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/analysis_server/test/integration/analysis/package_root_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/single_context_manager_test.dart
diff --git a/pkg/analysis_server/test/single_context_manager_test.dart b/pkg/analysis_server/test/single_context_manager_test.dart
index 97b4ec6f2b8ac2ff2b86a0f504b0a0a5695af300..eafa488ff5eab6645042d17da073f72a9041ce8a 100644
--- a/pkg/analysis_server/test/single_context_manager_test.dart
+++ b/pkg/analysis_server/test/single_context_manager_test.dart
@@ -14,7 +14,7 @@ import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/util/glob.dart';
import 'package:linter/src/plugin/linter_plugin.dart';
-import 'package:path/path.dart';
+import 'package:path/path.dart' as path;
import 'package:plugin/manager.dart';
import 'package:plugin/plugin.dart';
import 'package:test/test.dart';
@@ -43,18 +43,18 @@ class SingleContextManagerTest {
'**/*.${AnalysisEngine.SUFFIX_HTML}',
];
return patterns
- .map((pattern) => new Glob(posix.separator, pattern))
+ .map((pattern) => new Glob(path.posix.separator, pattern))
.toList();
}
String newFile(List<String> pathComponents, [String content = '']) {
- String filePath = posix.joinAll(pathComponents);
+ String filePath = path.posix.joinAll(pathComponents);
resourceProvider.newFile(filePath, content);
return filePath;
}
String newFolder(List<String> pathComponents) {
- String folderPath = posix.joinAll(pathComponents);
+ String folderPath = path.posix.joinAll(pathComponents);
resourceProvider.newFolder(folderPath);
return folderPath;
}
@@ -99,7 +99,7 @@ class SingleContextManagerTest {
resourceProvider.newFolder(root1);
resourceProvider.newFolder(root2);
manager.setRoots(<String>[root1, root2], <String>[], <String, String>{});
- expect(manager.isIgnored('$context/root3/file.dart'), isTrue);
+ expect(manager.isIgnored('/context/root3/file.dart'), isTrue);
}
void test_isInAnalysisRoot_false_inExcludedPath() {
@@ -117,7 +117,7 @@ class SingleContextManagerTest {
resourceProvider.newFolder(root1);
resourceProvider.newFolder(root2);
manager.setRoots(<String>[root1, root2], <String>[], <String, String>{});
- expect(manager.isInAnalysisRoot('$context/root3/file.dart'), isFalse);
+ expect(manager.isInAnalysisRoot('/context/root3/file.dart'), isFalse);
}
void test_isInAnalysisRoot_true() {
« no previous file with comments | « pkg/analysis_server/test/integration/analysis/package_root_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698