VT_Player/third_party/gotk3/gtk/actionable_test.go
Stu d4efa91ce1 Add vendored gotk3 GTK3 bindings for Go
Vendor gotk3 library to ensure consistent GTK3 bindings across
environments and simplify dependency management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-15 05:40:43 -05:00

36 lines
762 B
Go

package gtk
import "testing"
func TestActionableImplementsIActionable(t *testing.T) {
var cut interface{}
cut = &Actionable{}
_, ok := cut.(IActionable)
if !ok {
t.Error("Actionable does not implement IActionable")
return
}
}
// TestGetSetActionName tests the getter and setter for action name
// using a button, as we need an actual instance implementing Actionable.
func TestGetSetActionName(t *testing.T) {
cut, err := ButtonNew()
if err != nil {
t.Fatal("Error creating button", err.Error())
}
expected := "app.stuff"
cut.SetActionName(expected)
actual, err := cut.GetActionName()
if err != nil {
t.Fatal("Error getting action name", err.Error())
}
if expected != actual {
t.Fatalf("Expected %s got %s", expected, actual)
}
}