asserts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package asserts holds tiny test assertion helpers shared across botbooter's test packages. It is imported only from _test.go files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal[T comparable](t *testing.T, got, expected T, message string)

Equal fails the test with message if got is not equal to expected.

func Error

func Error(t *testing.T, err error, message string)

Error fails the test with message if err is nil.

func ErrorIs

func ErrorIs(t *testing.T, err, target error, message string)

ErrorIs fails the test with message if err does not match target under errors.Is.

func False

func False(t *testing.T, got bool, message string)

False fails the test with message if got is true.

func NoError

func NoError(t *testing.T, err error, message string)

NoError fails the test with message if err is non-nil.

func NotNil

func NotNil(t *testing.T, got any, message string)

NotNil fails the test with message if got is nil.

func True

func True(t *testing.T, got bool, message string)

True fails the test with message if got is false.

Types

This section is empty.

Jump to

Keyboard shortcuts

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