Documentation ¶
Index ¶
- Constants
- func Context(t testing.TB) context.Context
- func DiffDiagnostics(uri span.URI, want, got []source.Diagnostic) string
- func Run(t *testing.T, tests Tests, data *Data)
- type CompletionItems
- type CompletionSnippet
- type CompletionSnippets
- type Completions
- type Data
- type Definition
- type Definitions
- type Diagnostics
- type FoldingRanges
- type Formats
- type Golden
- type Highlights
- type Imports
- type Link
- type Links
- type PrepareRenames
- type References
- type Renames
- type Signatures
- type Symbols
- type SymbolsChildren
- type Tests
Constants ¶
View Source
const ( ExpectedCompletionsCount = 146 ExpectedCompletionSnippetCount = 15 ExpectedDiagnosticsCount = 21 ExpectedFormatCount = 6 ExpectedImportCount = 2 ExpectedDefinitionsCount = 39 ExpectedTypeDefinitionsCount = 2 ExpectedFoldingRangesCount = 1 ExpectedHighlightsCount = 2 ExpectedReferencesCount = 5 ExpectedRenamesCount = 20 ExpectedPrepareRenamesCount = 8 ExpectedSymbolsCount = 1 ExpectedSignaturesCount = 21 ExpectedLinksCount = 4 )
We hardcode the expected number of test cases to ensure that all tests are being executed. If a test is added, this number must be changed.
Variables ¶
This section is empty.
Functions ¶
func DiffDiagnostics ¶
func DiffDiagnostics(uri span.URI, want, got []source.Diagnostic) string
diffDiagnostics prints the diff between expected and actual diagnostics test results.
Types ¶
type CompletionItems ¶
type CompletionItems map[token.Pos]*source.CompletionItem
type CompletionSnippet ¶
type CompletionSnippets ¶
type CompletionSnippets map[span.Span]CompletionSnippet
type Data ¶
type Data struct { Config packages.Config Exported *packagestest.Exported Diagnostics Diagnostics CompletionItems CompletionItems Completions Completions CompletionSnippets CompletionSnippets FoldingRanges FoldingRanges Formats Formats Imports Imports Definitions Definitions Highlights Highlights References References Renames Renames PrepareRenames PrepareRenames Symbols Symbols Signatures Signatures Links Links // contains filtered or unexported fields }
type Definition ¶
type Definitions ¶
type Definitions map[span.Span]Definition
type Diagnostics ¶
type Diagnostics map[span.URI][]source.Diagnostic
type FoldingRanges ¶
type Highlights ¶
type PrepareRenames ¶
type PrepareRenames map[span.Span]*source.PrepareItem
type Signatures ¶
type Signatures map[span.Span]*source.SignatureInformation
type SymbolsChildren ¶
type Tests ¶
type Tests interface { Diagnostics(*testing.T, Diagnostics) Completion(*testing.T, Completions, CompletionSnippets, CompletionItems) FoldingRange(*testing.T, FoldingRanges) Format(*testing.T, Formats) Import(*testing.T, Imports) Definition(*testing.T, Definitions) Highlight(*testing.T, Highlights) Reference(*testing.T, References) Rename(*testing.T, Renames) PrepareRename(*testing.T, PrepareRenames) Symbol(*testing.T, Symbols) SignatureHelp(*testing.T, Signatures) Link(*testing.T, Links) }
Click to show internal directories.
Click to hide internal directories.