From e61ac810fe0bef5d32bfc13e614a75c8ca26eb96 Mon Sep 17 00:00:00 2001 From: Brian Wilkerson Date: Tue, 8 Nov 2022 17:50:40 +0000 Subject: [PATCH] Fix the windows bot Change-Id: Id15e2a4191fc11cf145ba5a10f3970d7135b0863 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268520 Reviewed-by: Konstantin Shcheglov Commit-Queue: Brian Wilkerson --- .../test/src/utilities/import_analyzer_test.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/analysis_server/test/src/utilities/import_analyzer_test.dart b/pkg/analysis_server/test/src/utilities/import_analyzer_test.dart index 37e5923dffc..37e5d33a217 100644 --- a/pkg/analysis_server/test/src/utilities/import_analyzer_test.dart +++ b/pkg/analysis_server/test/src/utilities/import_analyzer_test.dart @@ -628,16 +628,16 @@ abstract class ImportAnalyzerTest extends PubPackageAnalysisServerTest { Map<_ExpectedElement, List>? expectedStayingReferences}) async { createDefaultFiles(); var testCode = TestCode.parse(code); - addTestFile(testCode.code); + var pathToInclude = newFile(testFilePath, testCode.code).path; var context = AnalysisContextCollection( - includedPaths: [testFilePath], + includedPaths: [pathToInclude], resourceProvider: resourceProvider, sdkPath: sdkRoot.path) .contexts[0]; - var result = await context.currentSession.getResolvedLibrary(testFilePath) + var result = await context.currentSession.getResolvedLibrary(pathToInclude) as ResolvedLibraryResult; var analyzer = - ImportAnalyzer(result, testFilePath, testCode.range.sourceRange); + ImportAnalyzer(result, pathToInclude, testCode.range.sourceRange); if (expectedMovingDeclarations != null) { var movingDeclarations = analyzer.movingDeclarations.toList();