package test
import "fyne.io/fyne/v2/internal/test"
Index ¶
- func AssertImageMatches(t *testing.T, masterFilename string, img image.Image, msgAndArgs ...any) bool
- func DarkTheme(fallback fyne.Theme) fyne.Theme
- func LightTheme(fallback fyne.Theme) fyne.Theme
- func NewCheckedImage(w, h, hTiles, vTiles int) image.Image
- type FontMap
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. 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>` (relative to the test). This path is also reported, thus the file can be used as new master.
func DarkTheme ¶
func DarkTheme(fallback fyne.Theme) fyne.Theme
func LightTheme ¶
func LightTheme(fallback fyne.Theme) fyne.Theme
func NewCheckedImage ¶
NewCheckedImage returns a new black/white checked image with the specified size and the specified amount of horizontal and vertical tiles.
Types ¶
type FontMap ¶
func (FontMap) ResolveFace ¶
Source Files ¶
text.go theme.go util.go
- Version
- v2.5.4 (latest)
- Published
- Feb 1, 2025
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 1 month ago –
Tools for package owners.