MCPcopy Create free account
hub / github.com/cogentcore/core / assertPixels

Method assertPixels

core/testing.go:88–90  ·  view source on GitHub ↗

assertPixels asserts that [Scene.Pixels] is equivalent to the image stored at the given filename in the testdata directory, with ".png" added to the filename if there is no extension (eg: "button" becomes "testdata/button.png"). Forward slashes are automatically replaced with backslashes on Windows.

(t imagex.TestingT, filename string)

Source from the content-addressed store, hash-verified

86// execution. If there is no image at the given filename in the testdata
87// directory, it creates the image.
88func (sc *Scene) assertPixels(t imagex.TestingT, filename string) {
89 imagex.Assert(t, sc.Pixels, filename)
90}

Callers 1

AssertRenderMethod · 0.80

Calls 1

AssertFunction · 0.92

Tested by

no test coverage detected