assert

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

assert

import "github.com/azorg/cterm/pkg/testify/assert"

Package assert - локальная замена github.com/stretchr/testify/assert (набор функций, используемых в тестах проекта) на стандартном testing.

Index

func Contains

func Contains(t *testing.T, list, element any, args ...any) bool

Contains проверяет вхождение element в list (для строк - подстрока).

func Empty

func Empty(t *testing.T, object any, args ...any) bool

Empty проверяет, что значение пустое.

func Equal

func Equal(t *testing.T, expected, actual any, args ...any) bool

Equal проверяет глубокое равенство expected и actual.

func EqualError

func EqualError(t *testing.T, theError error, errString string, args ...any) bool

EqualError проверяет совпадение текста ошибки.

func EqualValues

func EqualValues(t *testing.T, expected, actual any, args ...any) bool

EqualValues сравнивает значения с приведением типов (как testify).

func Error

func Error(t *testing.T, err error, args ...any) bool

Error проверяет наличие ошибки.

func ErrorIs

func ErrorIs(t *testing.T, err, target error, args ...any) bool

ErrorIs проверяет errors.Is(err, target).

func Exactly

func Exactly(t *testing.T, expected, actual any, args ...any) bool

Exactly проверяет совпадение типов и глубокое равенство значений.

func False

func False(t *testing.T, value bool, args ...any) bool

False проверяет, что value ложно.

func IsType

func IsType(t *testing.T, expectedType, object any, args ...any) bool

IsType проверяет, что object имеет тип expectedType.

func Len

func Len(t *testing.T, object any, length int, args ...any) bool

Len проверяет длину объекта (строка/срез/массив/карта/канал).

func Nil

func Nil(t *testing.T, object any, args ...any) bool

Nil проверяет, что значение nil.

func NoError

func NoError(t *testing.T, err error, args ...any) bool

NoError проверяет отсутствие ошибки.

func NotContains

func NotContains(t *testing.T, list, element any, args ...any) bool

NotContains проверяет отсутствие вхождения element в list.

func NotEqual

func NotEqual(t *testing.T, expected, actual any, args ...any) bool

NotEqual проверяет неравенство expected и actual.

func NotNil

func NotNil(t *testing.T, object any, args ...any) bool

NotNil проверяет, что значение не nil.

func True

func True(t *testing.T, value bool, args ...any) bool

True проверяет, что value истинно.

Generated by gomarkdoc

Documentation

Overview

Package assert - локальная замена github.com/stretchr/testify/assert (набор функций, используемых в тестах проекта) на стандартном testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(t *testing.T, list, element any, args ...any) bool

Contains проверяет вхождение element в list (для строк - подстрока).

func Empty

func Empty(t *testing.T, object any, args ...any) bool

Empty проверяет, что значение пустое.

func Equal

func Equal(t *testing.T, expected, actual any, args ...any) bool

Equal проверяет глубокое равенство expected и actual.

func EqualError

func EqualError(t *testing.T, theError error, errString string, args ...any) bool

EqualError проверяет совпадение текста ошибки.

func EqualValues

func EqualValues(t *testing.T, expected, actual any, args ...any) bool

EqualValues сравнивает значения с приведением типов (как testify).

func Error

func Error(t *testing.T, err error, args ...any) bool

Error проверяет наличие ошибки.

func ErrorIs

func ErrorIs(t *testing.T, err, target error, args ...any) bool

ErrorIs проверяет errors.Is(err, target).

func Exactly

func Exactly(t *testing.T, expected, actual any, args ...any) bool

Exactly проверяет совпадение типов и глубокое равенство значений.

func False

func False(t *testing.T, value bool, args ...any) bool

False проверяет, что value ложно.

func IsType

func IsType(t *testing.T, expectedType, object any, args ...any) bool

IsType проверяет, что object имеет тип expectedType.

func Len

func Len(t *testing.T, object any, length int, args ...any) bool

Len проверяет длину объекта (строка/срез/массив/карта/канал).

func Nil

func Nil(t *testing.T, object any, args ...any) bool

Nil проверяет, что значение nil.

func NoError

func NoError(t *testing.T, err error, args ...any) bool

NoError проверяет отсутствие ошибки.

func NotContains

func NotContains(t *testing.T, list, element any, args ...any) bool

NotContains проверяет отсутствие вхождения element в list.

func NotEqual

func NotEqual(t *testing.T, expected, actual any, args ...any) bool

NotEqual проверяет неравенство expected и actual.

func NotNil

func NotNil(t *testing.T, object any, args ...any) bool

NotNil проверяет, что значение не nil.

func True

func True(t *testing.T, value bool, args ...any) bool

True проверяет, что value истинно.

Types

This section is empty.

Jump to

Keyboard shortcuts

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