Skip to content

Commit d23610c

Browse files
xperiandriclaude
andcommitted
Compare the located uses without building lists
The uses are collected into an array, and the duplicate check uses the collection assert on the sequence. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent c938e92 commit d23610c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎vsintegration/tests/FSharp.Editor.Tests/MultiTargetFindReferencesTests.fs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ let ``rename gets every use once, from an instance that compiles its file`` (ins
128128
usesByDocument declarationPosition (documentIn (instanceOf instance) firstPath)
129129

130130
let located =
131-
[
131+
[|
132132
for KeyValue(documentId, ranges) in uses do
133133
for range in ranges -> solution.GetDocument(documentId).FilePath, range
134-
]
134+
|]
135135

136136
// A file several instances compile is searched in each of them; the same use must reach Rename once.
137-
Assert.Equal<(string * range) list>(List.distinct located, located)
137+
Assert.Equal<string * range>(Seq.distinct located, located)
138138

139-
let files = located |> List.map fst |> List.distinct
139+
let files = located |> Seq.map fst |> Seq.distinct
140140

141141
for fileId in [ "Second"; "Third"; "Fourth"; "Fifth" ] do
142142
Assert.Contains(project.GetFilePath fileId, files)

0 commit comments

Comments
 (0)