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

Function TestRenderElementCutOff

core/render_test.go:169–182  ·  view source on GitHub ↗

For https://github.com/cogentcore/core/issues/1011

(t *testing.T)

Source from the content-addressed store, hash-verified

167
168// For https://github.com/cogentcore/core/issues/1011
169func TestRenderElementCutOff(t *testing.T) {
170 b := NewBody()
171 b.Styler(func(s *styles.Style) {
172 s.Min.X.Em(50)
173 })
174 sp := NewSplits(b)
175 NewFrame(sp)
176 fr := NewFrame(sp)
177 NewTextField(fr).Styler(func(s *styles.Style) {
178 s.Max.X.Zero()
179 })
180 NewButton(fr).SetIcon(icons.Send)
181 b.AssertRender(t, "render/element-cut-off")
182}
183
184// For https://github.com/cogentcore/core/issues/1012
185func TestRenderGridCenteredFrame(t *testing.T) {

Callers

nothing calls this directly

Calls 10

AssertRenderMethod · 0.95
NewBodyFunction · 0.85
NewSplitsFunction · 0.85
NewFrameFunction · 0.85
NewTextFieldFunction · 0.85
NewButtonFunction · 0.85
StylerMethod · 0.80
SetIconMethod · 0.65
EmMethod · 0.45
ZeroMethod · 0.45

Tested by

no test coverage detected