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

Function TestButtonShortcutKey

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

Source from the content-addressed store, hash-verified

85}
86
87func TestButtonShortcutKey(t *testing.T) {
88 b := NewBody()
89 bt := NewButton(b).SetKey(keymap.Open)
90 tt, _ := bt.WidgetTooltip(image.Point{})
91 assert.Equal(t, "[Ctrl+O]", tt)
92}
93
94func TestButtonShortcutMenu(t *testing.T) {
95 b := NewBody()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected