testutil

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertLocationsResult

func AssertLocationsResult(t *testing.T, actual []protocol.Location, expected []ExpectedLocationsResult)

func GetPositionOfMarkedLineInFile

func GetPositionOfMarkedLineInFile(fileContent, markedLine, marker string) (pos protocol.Position, found bool)

Finds the first occurrence of the marked line (or a substring) in the file and returns its position.

func GetRangeOfMarkedLineInFile

func GetRangeOfMarkedLineInFile(fileContent, markedLine, marker string) (pos protocol.Range, found bool)

func RangeMarkedLineToPositionMarkedLines

func RangeMarkedLineToPositionMarkedLines(markedLine string, marker string) (string, string)

Types

type ExpectedLocationsResult

type ExpectedLocationsResult struct {
	Filepath string
	// the expected line with the range marked using §§
	MarkedLine string
}

func (ExpectedLocationsResult) GetLocation

func (expected ExpectedLocationsResult) GetLocation() (protocol.Location, error)

Jump to

Keyboard shortcuts

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