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

Function AssertCapture

system/testing.go:18–20  ·  view source on GitHub ↗

AssertCapture asserts that the result of [Capture] 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"). If it is not, it fails the test with an error, but continues

(t imagex.TestingT, filename string)

Source from the content-addressed store, hash-verified

16// execution. If there is no image at the given filename in the testdata
17// directory, it creates the image.
18func AssertCapture(t imagex.TestingT, filename string) {
19 imagex.Assert(t, Capture(), filename)
20}

Callers 1

AssertRenderScreenMethod · 0.92

Calls 2

AssertFunction · 0.92
CaptureFunction · 0.85

Tested by

no test coverage detected