assert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package assert provides tools for testing, including utility functions to assert value equality and simplify debugging during development.

That is the entry point. It takes the *testing.T of the test that calls it, so it has no runnable example; it reads like this:

func Test_Add_With_TwoAndTwo_Should_ReturnFour(t *testing.T) {
	// Act
	sum := add(2, 2)

	// Assert
	assert.That(t, "sum must be 4", sum, 4)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func That

func That(t *testing.T, desc string, got, expected any)

That is a utility function to assert that two values are equal during a test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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