assert

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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