testutil

package
v0.0.0-...-fbda11f Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const RaceEnabled = false

Variables

This section is empty.

Functions

func IterCount

func IterCount() int

func RandMountImage

func RandMountImage(r *rand.Rand) []byte

func RandSource

func RandSource(t *testing.T) rand.Source

func RandValue

func RandValue(t *testing.T, typ any) any

RandValue creates a random value of the same type as the argument typ. It recursively fills structs/slices/maps similar to testing/quick.Value, but it handles time.Time as well w/o panicing (unfortunately testing/quick panics on time.Time).

Types

type Writer

type Writer struct {
	testing.TB
}

func (*Writer) Write

func (w *Writer) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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