assert

package
v0.1.92 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package assert is a minimal testing utility package with inline assertions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(t *testing.T, want, got any, msgAndArgs ...interface{})

Equal immediately fails a test function if want is not equal to got. It prints an optional formatted message with arguments.

func Error added in v0.1.81

func Error(t *testing.T, want, got error)

Error immediately fails a test function if err does not contain the target error in its tree.

func NoError

func NoError(t *testing.T, err error, msgAndArgs ...interface{})

NoError immediately fails a test function if err is not nil. It prints an optional formatted message with arguments.

Types

This section is empty.

Jump to

Keyboard shortcuts

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