testutil

package
v0.0.0-...-2bb223d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package testutil contains utilities for writing tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertErrorIf

func AssertErrorIf(t *testing.T, wantErr bool, err error, msgAndArgs ...any) bool

AssertErrorIf asserts that err is not nil if wantErr is true, or nil if wantErr is false.

func AssertNilIf

func AssertNilIf(t *testing.T, wantNil bool, actual any, msgAndArgs ...any) bool

AssertNilIf asserts that expected and actual are either both nil or both non-nil.

func AssertPanicsIf

func AssertPanicsIf(t *testing.T, wantPanic bool, f assert.PanicTestFunc, msgAndArgs ...any) bool

AssertPanicsIf asserts that function panics if wantPanic is true, or does not panic if wantPanic is false.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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