test

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package test provides testing utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Golden

func Golden() bool

Golden reports whether to write golden testdata files.

func GoldenName

func GoldenName(name string) string

GoldenName returns a path to the named golden file.

func Long

func Long() bool

Long reports whether long tests are enabled.

func Repeat

func Repeat(t *testing.T, trial func(t *testing.T) bool)

Repeat the given trial function. The duration is controlled by custom command-line flags. The trial function returns whether it wants to continue testing.

-short		run for less time than usual
-long		allow more time
-stress		run for an extremely long time

func RequireLong

func RequireLong(t *testing.T)

RequireLong marks this test as a long test. Test will be skipped if long tests are not enabled.

func RequireStress

func RequireStress(t *testing.T)

RequireStress marks this test as a stress test. Test will be skipped if stress tests are not enabled.

func Stress

func Stress() bool

Stress reports whether stress tests are enabled.

func Trials

func Trials(f func(t *testing.T) bool) func(t *testing.T)

Trials returns a function that repeats f.

Types

This section is empty.

Jump to

Keyboard shortcuts

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