testutils

package
v0.1.1 Latest Latest
Warning

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

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

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