MCPcopy
hub / github.com/looplab/fsm / TestInvalidEventError

Function TestInvalidEventError

errors_test.go:22–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20)
21
22func TestInvalidEventError(t *testing.T) {
23 event := "invalid event"
24 state := "state"
25 e := InvalidEventError{Event: event, State: state}
26 if e.Error() != "event "+e.Event+" inappropriate in current state "+e.State {
27 t.Error("InvalidEventError string mismatch")
28 }
29}
30
31func TestUnknownEventError(t *testing.T) {
32 event := "invalid event"

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…