testsuite

package
v0.3.15 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testsuite discovers and prepares TypeRB test declarations without coupling the parser or the language server to the test runner.

Index

Constants

View Source
const PackagePath = "trb/std/test"

Variables

This section is empty.

Functions

func IsTestFile

func IsTestFile(filename string) bool

Types

type Item

type Item struct {
	ID       string
	ParentID string
	Kind     Kind
	Name     string
	FullName string
	Span     token.Span
}

func Prepare

func Prepare(program *ast.Program, filename, registrationName string) ([]Item, []diagnostic.Diagnostic)

Prepare validates the compiler-owned test DSL. When registrationName is non-empty, top-level suites move into a generated function that a temporary test entrypoint can call after loading every project module.

func Sorted

func Sorted(items []Item) []Item

type Kind

type Kind string
const (
	Suite Kind = "suite"
	Case  Kind = "test"
)

Jump to

Keyboard shortcuts

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