testUtils

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SlicesHaveSameElements

func SlicesHaveSameElements[C comparable](a, b []C) bool

SlicesHaveSameElements compares two slices of comparable type to make sure that they have the same elements. The ordering of those elements does not matter

func SlicesHaveSameElementsOrderedType added in v0.16.0

func SlicesHaveSameElementsOrderedType[C interface {
	comparable
	cmp.Ordered
}](a, b []C) bool

SlicesHaveSameElements compares two slices of comparable and cmp.Ordered type to make sure that they have the same elements. The ordering of those elements does not matter. This is just a quicker way to test equality of the elements of slices if the types allow.

Types

This section is empty.

Jump to

Keyboard shortcuts

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