package testx import "testing" func Expect(t *testing.T, cond bool, message ...any) { t.Helper() if !cond { if len(message) == 0 { message = append(message, "expectation failed") } str := message[0].(string) t.Fatalf(str, message[1:]...) } } func ShouldPanic(t *testing.T, f func()) { t.Helper() defer func() { recover() }() f() t.Fatal("expected panic") }