package
0.1.7
Repository: https://github.com/polaris1119/tools.git
Documentation: pkg.go.dev

# Functions

CompletedWork expects a work item to have been completed >= atLeast times.
DebugAddress configures a debug server bound to addr.
No description provided by the author
DiagnosticAt asserts that there is a diagnostic entry at the position specified by line and col, for the workdir-relative path name.
EmptyDiagnostics asserts that empty diagnostics are sent for the workspace-relative path name.
EmptyOrNoDiagnostics asserts that either no diagnostics are sent for the workspace-relative path name, or empty diagnostics are sent.
GOPROXY configures the test environment to have an explicit proxy value.
InExistingDir runs the test in a pre-existing directory.
InGOPATH configures the workspace working directory to be GOPATH, rather than a separate working directory for use with modules.
LimitWorkspaceScope sets the LimitWorkspaceScope configuration.
LogMatching asserts that the client has received a log message of type typ matching the regexp re.
Main sets up and tears down the shared regtest state.
Modes configures the execution modes that the test should run in.
NewEnv creates a new test environment using the given scratch environment and gopls server.
NoDiagnosticAt asserts that there is no diagnostic entry at the position specified by line and col, for the workdir-relative path name.
NoDiagnostics asserts that no diagnostics are sent for the workspace-relative path name.
NoDiagnosticWithMessage asserts that there is no diagnostic entry with the given message.
NoErrorLogs asserts that the client has not received any log messages of error severity.
NoLogMatching asserts that the client has not received a log message of type typ matching the regexp re.
NoOutstandingWork asserts that there is no work initiated using the LSP $/progress API that has not completed.
NoShowMessage asserts that the editor has not received a ShowMessage.
OnceMet returns an Expectation that, once the precondition is met, asserts that mustMeet is met.
Options configures the various server and user options.
OutstandingWork expects a work item to be outstanding.
ProxyFiles configures a file proxy using the given txtar-encoded string.
ReadDiagnostics is an 'expectation' that is used to read diagnostics atomically.
RegistrationMatching asserts that the client has received a capability registration matching the given regexp.
No description provided by the author
No description provided by the author
ShowMessageRequest asserts that the editor has received a ShowMessageRequest with an action item that has the given title.
ShownMessage asserts that the editor has received a ShownMessage with the given title.
SkipHooks allows for disabling the test runner's client hooks that are used for instrumenting expectations (tracking diagnostics, logs, work done, etc.).
SkipLogs skips the buffering of logs during test execution.
StartedChange expects there to have been i work items started for processing didChange notifications.
StartedWork expect a work item to have been started >= atLeast times.
Timeout configures a custom timeout for this test run.
UnregistrationMatching asserts that the client has received an unregistration whose ID matches the given regexp.
No description provided by the author
WorkspaceFolders configures the workdir-relative workspace folders to send to the LSP server.

# Constants

Experimental enables all of the experimental configurations that are being developed.
Forwarded forwards connections to a shared in-process gopls instance.
Met indicates that an expectation is satisfied by the current state.
SeparateProcess forwards connection to a shared separate gopls process.
Singleton mode uses a separate in-process gopls instance for each test, and communicates over pipes to mimic the gopls sidecar execution mode, which communicates over stdin/stderr.
Unmeetable indicates that an expectation cannot be satisfied in the future.
Unmet indicates that an expectation is not currently met, but could be met in the future.

# Variables

InitialWorkspaceLoad is an expectation that the workspace initial load has completed.

# Structs

A DiagnosticExpectation is a condition that must be met by the current set of diagnostics for a file.
Env holds an initialized fake Editor, Workspace, and Server, which may be used for writing tests.
LogExpectation is an expectation on the log messages received by the editor from gopls.
RegistrationExpectation is an expectation on the capability registrations received by the editor from gopls.
A Runner runs tests in gopls execution environments, as specified by its modes.
SimpleExpectation holds an arbitrary check func, and implements the Expectation interface.
State encapsulates the server state TODO: explain more.
UnregistrationExpectation is an expectation on the capability unregistrations received by the editor from gopls.

# Interfaces

An Expectation asserts that the state of the editor at a point in time matches an expected condition.
A RunOption augments the behavior of the test runner.

# Type aliases

EditorConfig is a RunOption option that configured the regtest editor.
Mode is a bitmask that defines for which execution modes a test should run.
No description provided by the author
No description provided by the author
A Verdict is the result of checking an expectation against the current editor state.