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

Function TestMeterValue

core/meter_test.go:26–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24}
25
26func TestMeterValue(t *testing.T) {
27 b := NewBody()
28 m := NewMeter(b).SetValue(0.7)
29 tt, _ := m.WidgetTooltip(image.Point{})
30 assert.Equal(t, "(value: 0.7, minimum: 0, maximum: 1)", tt)
31 b.AssertRender(t, "meter/value")
32}
33
34func TestMeterBounds(t *testing.T) {
35 b := NewBody()

Callers

nothing calls this directly

Calls 6

AssertRenderMethod · 0.95
NewBodyFunction · 0.85
NewMeterFunction · 0.85
EqualMethod · 0.80
WidgetTooltipMethod · 0.65
SetValueMethod · 0.45

Tested by

no test coverage detected