File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
vsintegration/tests/FSharp.Editor.Tests/CodeFixes Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ type TestCodeFix = { Message: string; FixedCode: string }
2020type Mode =
2121 | Auto
2222 | WithOption of CustomProjectOption : string
23+ | WithSignature of FsiCode : string
2324 | Manual of Squiggly : string * Diagnostic : string
2425
2526let inline toOption o =
@@ -41,6 +42,7 @@ let getDocument code mode =
4142 match mode with
4243 | Auto -> RoslynTestHelpers.GetFsDocument code
4344 | WithOption option -> RoslynTestHelpers.GetFsDocument( code, option)
45+ | WithSignature fsiCode -> RoslynTestHelpers.GetFsiAndFsDocuments fsiCode code |> Seq.last
4446 | Manual _ -> RoslynTestHelpers.GetFsDocument code
4547
4648let getRelevantDiagnostics ( document : Document ) =
@@ -64,6 +66,7 @@ let createTestCodeFixContext (code: string) document (mode: Mode) diagnosticIds
6466 getRelevantDiagnostics document
6567 |> Array.filter ( fun d -> diagnosticIds |> Seq.contains d.ErrorNumberText)
6668 | WithOption _ -> getRelevantDiagnostics document
69+ | WithSignature _ -> getRelevantDiagnostics document
6770 | Manual ( squiggly, diagnostic) ->
6871 let spanStart = code.IndexOf squiggly
6972 let span = TextSpan( spanStart, squiggly.Length)
You can’t perform that action at this time.
0 commit comments