testingExt

package
v0.0.0-...-a794c3e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tst extends the functionality of the standard Go testing library with additional helper functions for assertions, test organization, and reporting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(t *testing.T, condition bool, msg string, args ...interface{})

Assert fails the test if the condition is false.

func Contains

func Contains(t *testing.T, str, substr string, msgAndArgs ...interface{})

Contains checks if the string contains the substring and fails the test if it does not.

func Equals

func Equals(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{})

Equals checks if expected and actual are equal and fails the test if they are not.

func Error

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

Error checks if the error is not nil and fails the test if it is nil.

func Nil

func Nil(t *testing.T, value interface{}, msgAndArgs ...interface{})

Nil checks if the value is nil and fails the test if it is not.

func NoError

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

NoError checks if the error is nil and fails the test if it is not nil.

func NotEquals

func NotEquals(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{})

NotEquals checks if expected and actual are not equal and fails the test if they are.

func NotNil

func NotNil(t *testing.T, value interface{}, msgAndArgs ...interface{})

NotNil checks if the value is not nil and fails the test if it is nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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