Documentation
¶
Overview ¶
Package test used for process tests
Index ¶
- func AssertFormValues(t *testing.T, r *http.Request, values values)
- func AssertHeader(t *testing.T, r *http.Request, header string, want string)
- func AssertMethod(t *testing.T, r *http.Request, want string)
- func AssertNilError(t *testing.T, err error)
- func AssertNoDiff(t *testing.T, want, got any)
- func AssertType(t *testing.T, v any, targetType string)
- func AssertURLParseError(t *testing.T, err error)
- func AssertWrite(t *testing.T, w io.Writer, data []byte)
- func MapsStringBoolEqual(a, b map[string]bool) bool
- func Ptr[T any](v T) *T
- func SafeFprint(w io.Writer, msg string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertFormValues ¶ added in v1.9.1
AssertFormValues checks form values
func AssertHeader ¶ added in v1.9.1
AssertHeader helper check if header exists
func AssertMethod ¶ added in v1.9.1
AssertMethod check request method
func AssertNilError ¶ added in v1.9.0
AssertNilError checks if error is not nil
func AssertNoDiff ¶ added in v1.9.0
AssertNoDiff check if vars different
func AssertType ¶ added in v1.9.0
AssertType check if v is the targetType
func AssertURLParseError ¶ added in v1.9.1
AssertURLParseError helper to check url parse error
func AssertWrite ¶ added in v1.9.0
AssertWrite check if writer write something
func MapsStringBoolEqual ¶
MapsStringBoolEqual check if two maps are equal
func Ptr ¶ added in v1.9.0
func Ptr[T any](v T) *T
Ptr is a helper routine that allocates a new T value to store v and returns a pointer to it.
func SafeFprint ¶ added in v1.9.1
SafeFprint prints msg and handle error if exists
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.