Documentation ¶
Index ¶
- func AssertProcessesAreTraceEquivalent(t *rapid.T, actual csp.Process, expected csp.Process)
- func EventsAsSlice(set csp.EventSet) []csp.Event
- func PerformEvent(t *rapid.T, tc *csp.TraceChecker) states.Action
- func RandomEvent(max int) *rapid.Generator[Event]
- func SelectEvent(t *rapid.T, tp *csp.TracedProcess, f func(next csp.Event)) states.Action
- func SelectRandomEvent(t *rapid.T, set csp.EventSet, f func(selected csp.Event)) states.Action
- type Event
- type EventSet
- func (tes EventSet) Contains(ve any) bool
- func (tes EventSet) Difference(vother csp.UserEventSet) csp.UserEventSet
- func (tes EventSet) Equal(vother csp.UserEventSet) bool
- func (tes EventSet) Format(f fmt.State, verb rune)
- func (tes EventSet) HasNonemptyIntersection(vother csp.UserEventSet) bool
- func (tes EventSet) Intersection(vother csp.UserEventSet) csp.UserEventSet
- func (tes EventSet) IsEmpty() bool
- func (tes EventSet) Union(vother csp.UserEventSet) csp.UserEventSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertProcessesAreTraceEquivalent ¶
AssertProcessHasTrace checks whether two processes have the same set of traces. (It does not do this exhaustively; it uses the property test harness to generate and test a particular trace.)
func EventsAsSlice ¶
EventsAsSlice returns a slice containing all of the events in a set.
func PerformEvent ¶
PerformEvent verifies that the “actual” and “expected” processes have the same set of allowed events at this point in the test. It then returns an [Action] that randomly selects one of those events and has both processes perform it.
func RandomEvent ¶
RandomEvent returns a rapid.Generator that produces a random Event.
func SelectEvent ¶
SelectEvent returns an [Action] that randomly selects one of the process's available events, and invokes a callback with the selected event.
Types ¶
type EventSet ¶
type EventSet struct {
// contains filtered or unexported fields
}
EventSet is an event set that contains [Event]s.
func Events ¶
Events returns the Event elements of a csp.EventSet.
func (EventSet) Difference ¶
func (tes EventSet) Difference(vother csp.UserEventSet) csp.UserEventSet
func (EventSet) HasNonemptyIntersection ¶
func (tes EventSet) HasNonemptyIntersection(vother csp.UserEventSet) bool
func (EventSet) Intersection ¶
func (tes EventSet) Intersection(vother csp.UserEventSet) csp.UserEventSet
func (EventSet) Union ¶
func (tes EventSet) Union(vother csp.UserEventSet) csp.UserEventSet