seqtest

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertElementsMatch2 added in v0.8.0

func AssertElementsMatch2[K, V any](t *testing.T, expected []KeyValuePair[K, V], seq iter.Seq2[K, V])

AssertElementsMatch2 asserts that the expected key-value pairs match the actual key-value pairs from a sequence in any order.

func AssertEqual

func AssertEqual[V any](t *testing.T, expected []V, seq iter.Seq[V])

AssertEqual asserts that the expected values are equal to the actual values from a sequence.

func AssertEqual2

func AssertEqual2[K, V any](t *testing.T, expected []KeyValuePair[K, V], seq iter.Seq2[K, V])

AssertEqual2 asserts that the expected key-value pairs are equal to the actual key-value pairs from a sequence.

Types

type KeyValuePair

type KeyValuePair[K, V any] struct {
	Key   K
	Value V
}

KeyValuePair represents a value and its key.

Jump to

Keyboard shortcuts

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