assert

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package assert holds dependency-free test assertion helpers usable from any package's tests. It deliberately imports no flate packages so that even internal (package X) tests of packages that internal/testutil depends on — manifest, store — can use it without an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(t testing.TB, got, want any)

Diff fails t (non-fatally) with a structural diff when got != want. Uses go-cmp; intended for maps, slices, and structs with exported fields (cmp panics on unexported fields without options) — keep manual comparison for types with unexported state.

func Equal

func Equal[T comparable](t testing.TB, got, want T)

Equal fails t (non-fatally) when got != want, reporting both.

Types

This section is empty.

Jump to

Keyboard shortcuts

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