Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreDiagnosticEquivalent ¶
func AreDiagnosticEquivalent(a protocol.Diagnostic, b protocol.Diagnostic) bool
Compare two diagnostics and indicate if they are equivalents or not Two diagnostics are equivalent if they match all of the following conditions:
- Same code
- Same message
- Same range
- Same severity
func ListHasDiagnostic ¶
func ListHasDiagnostic(list []protocol.Diagnostic, diagnostic protocol.Diagnostic) bool
Indicate if a diagnostic is present in the given list Will return true if a diagnostic match all the given conditions:
- Same code
- Same message
- Same range
- Same severity
Types ¶
type Diag ¶
type Diag struct { To DiagTo // contains filtered or unexported fields }
func Diagnostic ¶
func Diagnostic(t *testing.T, diagnostic protocol.Diagnostic) Diag
type DiagTo ¶
type DiagTo struct { Not DiagToNot // contains filtered or unexported fields }
func (DiagTo) Equal ¶
func (expect DiagTo) Equal(diagnostic protocol.Diagnostic)
type DiagToNot ¶
type DiagToNot struct {
// contains filtered or unexported fields
}
func (DiagToNot) Equal ¶
func (expect DiagToNot) Equal(diagnostic protocol.Diagnostic)
type ExpectDiagnosticList ¶
type ExpectDiagnosticList struct {
To To
}
func DiagnosticList ¶
func DiagnosticList(t *testing.T, list []protocol.Diagnostic) ExpectDiagnosticList
type To ¶
func (To) Include ¶
func (expect To) Include( diagnostic protocol.Diagnostic, )
func (To) IncludeAll ¶
func (expect To) IncludeAll( diagnostics []protocol.Diagnostic, )
type ToNot ¶
type ToNot struct { Be ToNotBe // contains filtered or unexported fields }
func (ToNot) Include ¶
func (expect ToNot) Include( diagnostic protocol.Diagnostic, )
func (ToNot) IncludeAll ¶
func (expect ToNot) IncludeAll( val []protocol.Diagnostic, )
Assert that the given val is not a complete subset of the list
Click to show internal directories.
Click to hide internal directories.