From 6d6da849ba3dedd99b3e57448bc92761dba6c80e Mon Sep 17 00:00:00 2001 From: Jens Johansen Date: Thu, 19 Jun 2025 06:13:05 -0700 Subject: [PATCH] [analyzer] Fix analysis_context_collection_test on Windows https://dart-review.googlesource.com/c/sdk/+/434802 (0677fcac838fcec7a3deff5d0aa6ae13bcd5a820) introduced a few new tests that didn't work on Windows. Change-Id: I841cb479b6782a83d8472ee4c074ef2b3b51709a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435820 Reviewed-by: Johnni Winther Commit-Queue: Jens Johansen --- .../analysis/analysis_context_collection_test.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart b/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart index 3c88574c8fe..4e4925dd1da 100644 --- a/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart +++ b/pkg/analyzer/test/src/dart/analysis/analysis_context_collection_test.dart @@ -1086,7 +1086,7 @@ workspaces var collection = AnalysisContextCollectionImpl( resourceProvider: resourceProvider, sdkPath: sdkRoot.path, - includedPaths: [pubWorkspace.workspaceRootPath], + includedPaths: [getFolder(pubWorkspace.workspaceRootPath).path], ); // We expect only 1 context. @@ -1128,9 +1128,9 @@ workspaces resourceProvider: resourceProvider, sdkPath: sdkRoot.path, includedPaths: [ - pubWorkspace.package1, - pubWorkspace.workspaceRootPath, - pubWorkspace.package2, + getFolder(pubWorkspace.package1).path, + getFolder(pubWorkspace.workspaceRootPath).path, + getFolder(pubWorkspace.package2).path, ], ); @@ -1198,7 +1198,10 @@ workspaces var collection = AnalysisContextCollectionImpl( resourceProvider: resourceProvider, sdkPath: sdkRoot.path, - includedPaths: [pubWorkspace.package1, pubWorkspace.package2], + includedPaths: [ + getFolder(pubWorkspace.package1).path, + getFolder(pubWorkspace.package2).path, + ], ); // We expect only 1 context.