test

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package test used for process tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFormValues added in v1.9.1

func AssertFormValues(t *testing.T, r *http.Request, values values)

AssertFormValues checks form values

func AssertHeader added in v1.9.1

func AssertHeader(t *testing.T, r *http.Request, header string, want string)

AssertHeader helper check if header exists

func AssertMethod added in v1.9.1

func AssertMethod(t *testing.T, r *http.Request, want string)

AssertMethod check request method

func AssertNilError added in v1.9.0

func AssertNilError(t *testing.T, err error)

AssertNilError checks if error is not nil

func AssertNoDiff added in v1.9.0

func AssertNoDiff(t *testing.T, want, got any)

AssertNoDiff check if vars different

func AssertType added in v1.9.0

func AssertType(t *testing.T, v any, targetType string)

AssertType check if v is the targetType

func AssertURLParseError added in v1.9.1

func AssertURLParseError(t *testing.T, err error)

AssertURLParseError helper to check url parse error

func AssertWrite added in v1.9.0

func AssertWrite(t *testing.T, w io.Writer, data []byte)

AssertWrite check if writer write something

func MapsStringBoolEqual

func MapsStringBoolEqual(a, b map[string]bool) bool

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

func SafeFprint(w io.Writer, msg string)

SafeFprint prints msg and handle error if exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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