Documentation ¶
Overview ¶
Package testy implements some helpers for writing tests.
Package testy implements some helpers for writing tests.
Package testy implements some helpers for writing tests.
Package testy implements some helpers for writing tests.
Index ¶
- func Assert(t *testing.T, v bool, msg ...interface{})
- func AssertEqual(t *testing.T, v1, v2 interface{}, msg ...interface{})
- func AssertEqualFloat32(t *testing.T, v1, v2 float32, eps float64, msg ...interface{})
- func AssertEqualFloat64(t *testing.T, v1, v2 float64, eps float64, msg ...interface{})
- func AssertError(t *testing.T, err error, msg ...interface{})
- func AssertErrorIs(t *testing.T, err error, target error, msg ...interface{})
- func AssertFalse(t *testing.T, v bool, msg ...interface{})
- func AssertNoErr(t *testing.T, err error, msg ...interface{})
- func AssertNotEqual(t *testing.T, v1, v2 interface{}, msg ...interface{})
- func AssertNotEqualFloat32(t *testing.T, v1, v2 float32, eps float64, msg ...interface{})
- func AssertNotEqualFloat64(t *testing.T, v1, v2 float64, eps float64, msg ...interface{})
- func AssertNotNil(t *testing.T, v interface{}, msg ...interface{})
- func AssertNotSubstr(t *testing.T, substr, str string)
- func AssertPanic(t *testing.T, f func())
- func AssertSubstr(t *testing.T, substr, str string)
- func AssertTrue(t *testing.T, v bool, msg ...interface{})
- 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 AssertEqualFloat32 ¶ added in v0.6.0
AssertEqualFloat32 checks that two float32 values are equal.
func AssertEqualFloat64 ¶ added in v0.6.0
AssertEqualFloat64 checks that two float64 values are equal.
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.
func AssertNotEqualFloat64 ¶ added in v0.6.0
AssertNotEqualFloat64 checks that two float64 values are not equal.
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 AssertSubstr ¶
AssertSubstr asserts that first string is substring of the second one.
func AssertTrue ¶
AssertTrue checks that value is true.