testutils

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFileNode

func AssertFileNode(t *testing.T, got, want *parser.DocumentNode)

func AssertGold

func AssertGold(t *testing.T, path string, content string)

func AssertToken

func AssertToken(t *testing.T, got, want lexer.Token)

func FileExists

func FileExists(path string) bool

func GenerateTokenList

func GenerateTokenList(min, max int, token lexer.TokenType) []lexer.Token

func GetGoldenFiles

func GetGoldenFiles() ([]string, error)

func PathToGold

func PathToGold(path string, suffix string) string

func Pos

func Pos(line, column int) diag.Position

func WriteGold

func WriteGold(t *testing.T, path string, content string)

Types

type TokenList

type TokenList struct {
	// contains filtered or unexported fields
}

func NewTokenList

func NewTokenList(tokens ...lexer.Token) *TokenList

func (*TokenList) NextToken

func (t *TokenList) NextToken() (lexer.Token, error)

Jump to

Keyboard shortcuts

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