Fix analysis_server tests on Windows.
R=brianwilkerson@google.com
Change-Id: I9e66a81a8aab249ce4174085e2432e4ed53d943d
Reviewed-on: https://dart-review.googlesource.com/58142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analysis_server/test/analysis_server_test.dart b/pkg/analysis_server/test/analysis_server_test.dart
index f5fd828..175454e 100644
--- a/pkg/analysis_server/test/analysis_server_test.dart
+++ b/pkg/analysis_server/test/analysis_server_test.dart
@@ -143,14 +143,14 @@
}
test_setAnalysisSubscriptions_fileInIgnoredFolder_newOptions() async {
- String path = '/project/samples/sample.dart';
+ String path = convertPath('/project/samples/sample.dart');
newFile(path);
newFile('/project/analysis_options.yaml', content: r'''
analyzer:
exclude:
- 'samples/**'
''');
- server.setAnalysisRoots('0', ['/project'], [], {});
+ server.setAnalysisRoots('0', [convertPath('/project')], [], {});
server.setAnalysisSubscriptions(<AnalysisService, Set<String>>{
AnalysisService.NAVIGATION: new Set<String>.from([path])
});
@@ -163,14 +163,14 @@
}
test_setAnalysisSubscriptions_fileInIgnoredFolder_oldOptions() async {
- String path = '/project/samples/sample.dart';
+ String path = convertPath('/project/samples/sample.dart');
newFile(path);
newFile('/project/.analysis_options', content: r'''
analyzer:
exclude:
- 'samples/**'
''');
- server.setAnalysisRoots('0', ['/project'], [], {});
+ server.setAnalysisRoots('0', [convertPath('/project')], [], {});
server.setAnalysisSubscriptions(<AnalysisService, Set<String>>{
AnalysisService.NAVIGATION: new Set<String>.from([path])
});
diff --git a/pkg/analysis_server/test/domain_analysis_test.dart b/pkg/analysis_server/test/domain_analysis_test.dart
index d75a3b9..93d6395 100644
--- a/pkg/analysis_server/test/domain_analysis_test.dart
+++ b/pkg/analysis_server/test/domain_analysis_test.dart
@@ -576,7 +576,7 @@
}
test_afterAnalysis_noSuchFile() async {
- String file = '/no-such-file.dart';
+ String file = convertPath('/no-such-file.dart');
addTestFile('// no matter');
createProject();
// wait for analysis, no results initially