test

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: BSD-3-Clause 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 AssertImageMatches

func AssertImageMatches(t *testing.T, masterFilename string, img image.Image, msgAndArgs ...any) bool

AssertImageMatches asserts that the given image is the same as the one stored in the master file. The master filename is relative to the `testdata` directory which is relative to the test.

Environment variables:

  • UPDATE_TESTDATA=1 : auto-update master files instead of failing
  • BELLUI_TEST_TOLERANCE=N : pixel delta tolerance (default 4)

The test `t` fails if the given image is not equal to the loaded master image. In this case the given image is written into a file in `testdata/failed/<masterFilename>`.

func DarkTheme

func DarkTheme(fallback bellui.Theme) bellui.Theme

func LightTheme

func LightTheme(fallback bellui.Theme) bellui.Theme

func NewCheckedImage

func NewCheckedImage(w, h, hTiles, vTiles int) image.Image

NewCheckedImage returns a new black/white checked image with the specified size and the specified amount of horizontal and vertical tiles.

Types

type FontMap

type FontMap []*font.Face

func (FontMap) ResolveFace

func (f FontMap) ResolveFace(r rune) *font.Face

Jump to

Keyboard shortcuts

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