Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd committed Oct 9, 2023
1 parent 7d998c7 commit 5c3953e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5052,8 +5052,11 @@ type AdaptiveFSharpLspServer

return ()
}
member this.CallHierarchyOutgoingCalls(arg1: CallHierarchyOutgoingCallsParams): AsyncLspResult<CallHierarchyOutgoingCall array option> =
AsyncLspResult.notImplemented

member this.CallHierarchyOutgoingCalls
(arg1: CallHierarchyOutgoingCallsParams)
: AsyncLspResult<CallHierarchyOutgoingCall array option> =
AsyncLspResult.notImplemented

module AdaptiveFSharpLspServer =

Expand Down
2 changes: 1 addition & 1 deletion src/FsAutoComplete/LspServers/Common.fs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type DiagnosticCollection(sendDiagnostics: DocumentUri -> Diagnostic[] -> Async<
match! inbox.Receive() with
| Add(source, version, diags) ->
match Map.tryFind source state with
| Some(oldVersion, _) when oldVersion >= version -> return! loop state
| Some(oldVersion, _) when oldVersion > version -> return! loop state
| _ ->
let newState = state |> Map.add source (version, diags)
do! send uri newState
Expand Down
5 changes: 3 additions & 2 deletions test/FsAutoComplete.Tests.Lsp/CallHierarchyTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ open Utils.Server
open Ionide.LanguageServerProtocol.Types

let examples = Path.Combine(__SOURCE_DIRECTORY__, "TestCases", "CallHierarchy")
let incomingExamples = Path.Combine(examples, "IncomingCalls")
let sourceFactory : ISourceTextFactory = RoslynSourceTextFactory()
let resultGet = function | Ok x -> x | Error e -> failwithf "%A" e
let resultOptionGet =
Expand All @@ -37,7 +38,7 @@ module LspRange =


let incomingTests createServer =
serverTestList "IncomingTests" createServer defaultConfigDto (Some examples) (fun server -> [
serverTestList "IncomingTests" createServer defaultConfigDto (Some incomingExamples) (fun server -> [
testCaseAsync "Example1" <| async {
let! (aDoc, _) = Server.openDocument "Example1.fsx" server
use aDoc = aDoc
Expand Down Expand Up @@ -91,6 +92,6 @@ let incomingTests createServer =


let tests createServer =
ftestList "CallHierarchy" [
testList "CallHierarchy" [
incomingTests createServer
]

0 comments on commit 5c3953e

Please sign in to comment.