Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertCompletionContains

func AssertCompletionContains(t *testing.T, items []protocol.CompletionItem, label string)

func AssertDiagnosticAt

func AssertDiagnosticAt(t *testing.T, diags []protocol.Diagnostic, line int, substr string)

func AssertInlayHintAt

func AssertInlayHintAt(t *testing.T, hints []protocol.InlayHint, line int, contains string)

Types

type Harness

type Harness struct {
	Server *servertest.Harness
	// contains filtered or unexported fields
}

func NewHarness

func NewHarness(t *testing.T) *Harness

func (*Harness) ChangeDocument

func (h *Harness) ChangeDocument(uri, text string)

func (*Harness) CloseDocument

func (h *Harness) CloseDocument(uri string)

func (*Harness) GetCodeLenses

func (h *Harness) GetCodeLenses(uri string) []protocol.CodeLens

func (*Harness) GetCompletions

func (h *Harness) GetCompletions(uri string, pos protocol.Position) []protocol.CompletionItem

func (*Harness) GetHover

func (h *Harness) GetHover(uri string, pos protocol.Position) *protocol.Hover

func (*Harness) GetInlayHints

func (h *Harness) GetInlayHints(uri string) []protocol.InlayHint

func (*Harness) OpenDocument

func (h *Harness) OpenDocument(uri, text string)

func (*Harness) WaitForDiagnostics

func (h *Harness) WaitForDiagnostics(uri string, timeout time.Duration) []protocol.Diagnostic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL