Discover Packages
github.com/C0d3-5t3w/myT00L5
testingExt
package
Version:
v0.0.0-...-a794c3e
Opens a new window with list of versions in this module.
Published: Apr 19, 2025
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
Assert(t, condition, msg, args)
Contains(t, str, substr, msgAndArgs)
Equals(t, expected, actual, msgAndArgs)
Error(t, err, msgAndArgs)
Nil(t, value, msgAndArgs)
NoError(t, err, msgAndArgs)
NotEquals(t, expected, actual, msgAndArgs)
NotNil(t, value, msgAndArgs)
Types
Source Files
Documentation
Documentation
¶
Package tst extends the functionality of the standard Go testing library
with additional helper functions for assertions, test organization, and reporting.
func Assert(t *testing.T, condition bool, msg string, args ...interface{})
func Contains(t *testing.T, str, substr string, msgAndArgs ...interface{})
func Equals(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{})
func Error(t *testing.T, err error, msgAndArgs ...interface{})
func Nil(t *testing.T, value interface{}, msgAndArgs ...interface{})
func NoError(t *testing.T, err error, msgAndArgs ...interface{})
func NotEquals(t *testing.T, expected, actual interface{}, msgAndArgs ...interface{})
func NotNil(t *testing.T, value interface{}, msgAndArgs ...interface{})
Assert fails the test if the condition is false.
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(t *testing .T , expected, actual interface{}, msgAndArgs ...interface{})
Equals checks if expected and actual are equal and fails the test if they are not.
Error checks if the error is not nil and fails the test if it is 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.
NoError checks if the error is nil and fails the test if it is not nil.
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(t *testing .T , value interface{}, msgAndArgs ...interface{})
NotNil checks if the value is not nil and fails the test if it is nil.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.