ghcide-2.7.0.0: The core of an IDE
Safe HaskellSafe-Inferred
LanguageGHC2021

Development.IDE.Test

Synopsis

Documentation

type Cursor = (UInt, UInt) Source #

(0-based line number, 0-based column number)

diagnostic :: Session (TNotificationMessage Method_TextDocumentPublishDiagnostics) Source #

expectDiagnostics :: HasCallStack => [(FilePath, [(DiagnosticSeverity, Cursor, Text)])] -> Session () Source #

It is not possible to use 'expectDiagnostics []' to assert the absence of diagnostics, only that existing diagnostics have been cleared.

Rather than trying to assert the absence of diagnostics, introduce an expected diagnostic (e.g. a redundant import) and assert the singleton diagnostic.

expectNoMoreDiagnostics :: HasCallStack => Seconds -> Session () Source #

wait for timeout seconds and report an assertion failure if any diagnostic messages arrive in that period

expectMessages :: SMethod m -> Seconds -> (TServerMessage m -> Session ()) -> Session () Source #

waitForAction :: String -> TextDocumentIdentifier -> Session WaitForIdeRuleResult Source #

getInterfaceFilesDir :: TextDocumentIdentifier -> Session FilePath Source #

waitForTypecheck :: TextDocumentIdentifier -> Session Bool Source #

isReferenceReady :: FilePath -> Session () Source #

Pattern match a message from ghcide indicating that a file has been indexed