dagtest

package
v1.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireComparableGraphEqual added in v1.32.0

func RequireComparableGraphEqual[Key cmp.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 cmp.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 cmp.Ordered] struct {
	Key      Key
	Outbound []Key
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL