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

Function TestButtonShortcut

core/button_test.go:72–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

70}
71
72func TestButtonShortcut(t *testing.T) {
73 b := NewBody()
74 bt := NewButton(b).SetShortcut("Command+S")
75 tt, _ := bt.WidgetTooltip(image.Point{})
76 assert.Equal(t, "[Ctrl+S]", tt)
77}
78
79func TestButtonShortcutWithTooltip(t *testing.T) {
80 b := NewBody()

Callers

nothing calls this directly

Calls 5

NewBodyFunction · 0.85
NewButtonFunction · 0.85
SetShortcutMethod · 0.80
EqualMethod · 0.80
WidgetTooltipMethod · 0.65

Tested by

no test coverage detected