assertive

package
v0.0.0-...-92360a8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package assertive provides two boolean assertion functions, both compatible with the standard testing.T type. They avoid repetitive boilerplate around T.Error and T.Fatal and augment those functions with extracted source code. See this package's tests for usage examples.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Need

func Need(t miniT, condition bool)

Need marks the test as failed if condition is false and stops execution of the running test. Use this function when the test cannot continue after the current assertion fails, due to cascading failures or because it makes no sense to continue the execution for any other reason.

func Want

func Want(t miniT, condition bool)

Want marks the test as failed if condition is false. Use this function when the test may continue even if the assertion fails.

Types

This section is empty.

Jump to

Keyboard shortcuts

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