Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireComparableGraphEqual ¶ added in v1.32.0
func RequireComparableGraphEqual[Key Ordered]( t *testing.T, expected []ExpectedNode[Key], comparableGraph *dag.ComparableGraph[Key], )
RequireComparableGraphEqual requires that the Comparable equals the given ExpectedNodes.
The order of the input ExpectedNodes does not matter, and the order of the outbound Keys does not matter.
func RequireGraphEqual ¶
func RequireGraphEqual[Key Ordered, Value any]( t *testing.T, expected []ExpectedNode[Key], graph *dag.Graph[Key, Value], toKey func(Value) Key, )
RequireGraphEqual requires that the graph equals the given ExpectedNodes.
The order of the input ExpectedNodes does not matter, and the order of the outbound Keys does not matter.
Types ¶
type ExpectedNode ¶
type ExpectedNode[Key Ordered] struct { Key Key Outbound []Key }
type Ordered ¶
type Ordered interface { ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 | ~string }
Ordered matches cmp.Ordered until we only support Go versions >= 1.21.
TODO: remove and replace with cmp.Ordered when we only support Go versions >= 1.21.
Click to show internal directories.
Click to hide internal directories.