Documentation
¶
Overview ¶
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Package testy provides the assert helpers for writing unit tests.
Index ¶
- func Assert(t *testing.T, v bool, msg ...any)
- func AssertEqual(t *testing.T, v1, v2 any, msg ...any)
- func AssertEqualComplex(t *testing.T, c1, c2 complex128, eps float64, msg ...any)
- func AssertEqualFloat32(t *testing.T, v1, v2 float32, eps float64, msg ...any)
- func AssertEqualFloat64(t *testing.T, v1, v2 float64, eps float64, msg ...any)
- func AssertError(t *testing.T, err error, msg ...any)
- func AssertErrorIs(t *testing.T, err error, target error, msg ...any)
- func AssertFalse(t *testing.T, v bool, msg ...any)
- func AssertNoErr(t *testing.T, err error, msg ...any)
- func AssertNotEqual(t *testing.T, v1, v2 any, msg ...any)
- func AssertNotEqualFloat32(t *testing.T, v1, v2 float32, eps float64, msg ...any)
- func AssertNotEqualFloat64(t *testing.T, v1, v2 float64, eps float64, msg ...any)
- func AssertNotNil(t *testing.T, v any, msg ...any)
- func AssertNotSubstr(t *testing.T, substr, str string)
- func AssertPanic(t *testing.T, f func())
- func AssertRelEqualFloat32(t *testing.T, v1, v2 float32, eps float64, msg ...any)
- func AssertRelEqualFloat64(t *testing.T, v1, v2 float64, eps float64, msg ...any)
- func AssertRelNotEqualFloat32(t *testing.T, v1, v2 float32, eps float64, msg ...any)
- func AssertRelNotEqualFloat64(t *testing.T, v1, v2 float64, eps float64, msg ...any)
- func AssertSubstr(t *testing.T, substr, str string)
- func AssertTrue(t *testing.T, v bool, msg ...any)
- func CopyFile(src string, dest string) (err error)
- func FileSize(name string) (size int64, err error)
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
AssertEqual checks that two values are equal.
func AssertEqualComplex ¶ added in v0.8.0
func AssertEqualComplex(t *testing.T, c1, c2 complex128, eps float64, msg ...any)
AssertEqualComplex checks that two complex values are almost equal.
func AssertEqualFloat32 ¶ added in v0.6.0
AssertEqualFloat32 checks that two float32 values are equal with absolute eps.
func AssertEqualFloat64 ¶ added in v0.6.0
AssertEqualFloat64 checks that two float64 values are equal with absolute eps.
func AssertError ¶
AssertError checks that error is not nil.
func AssertErrorIs ¶ added in v0.7.0
AssertError checks that error is wanted.
func AssertFalse ¶
AssertFalse checks that value is false.
func AssertNoErr ¶
AssertNoErr check if error is nil.
func AssertNotEqual ¶
AssertNotEqual checks that two values are not equal.
func AssertNotEqualFloat32 ¶ added in v0.6.0
AssertNotEqualFloat32 checks that two float32 values are not equal with absolute eps.
func AssertNotEqualFloat64 ¶ added in v0.6.0
AssertNotEqualFloat64 checks that two float64 values are not equal with absolute eps.
func AssertNotNil ¶
AssertNotNil checks that value is not nil.
func AssertNotSubstr ¶ added in v0.5.0
AssertNotSubstr asserts that first string is not substring of the second one.
func AssertPanic ¶
AssertPanic asserts that call of f gives panic.
func AssertRelEqualFloat32 ¶ added in v0.9.0
AssertRelEqualFloat32 checks that two float32 values are equal with relative eps.
func AssertRelEqualFloat64 ¶ added in v0.9.0
AssertRelEqualFloat64 checks that two float64 values are equal with relative eps.
func AssertRelNotEqualFloat32 ¶ added in v0.9.0
AssertRelNotEqualFloat32 checks that two float32 values are not equal with relative eps.
func AssertRelNotEqualFloat64 ¶ added in v0.9.0
AssertRelNotEqualFloat64 checks that two float64 values are not equal.
func AssertSubstr ¶
AssertSubstr asserts that first string is substring of the second one.
func AssertTrue ¶
AssertTrue checks that value is true.