testutil

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ENCODE_REPEAT_COUNT = 20

Variables

This section is empty.

Functions

func Assert

func Assert(t *testing.T, message string, isOk bool)

func AssertBytesEqual

func AssertBytesEqual(t *testing.T, expected, actual []byte)

func AssertEncodingStable

func AssertEncodingStable(t *testing.T, expected []byte, encoder func(io.Writer))

func AssertEquals

func AssertEquals(t *testing.T, message string, expected, actual interface{})

func AssertLenEquals

func AssertLenEquals(t *testing.T, expected int, hasLen interface{})

func AssertNil

func AssertNil(t *testing.T, x interface{})

func AssertNonNil

func AssertNonNil(t *testing.T, x interface{})

func AssertVerboseErrorIsNil

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

func DebugLine

func DebugLine(t *testing.T)

func GenCount

func GenCount(rand *rand.Rand, size int) int

Fudge to generate count of sample data.

func GenCountRange

func GenCountRange(rand *rand.Rand, min, max int) int

Generate count of sample data.

func Insert

func Insert(old, ins string, pos int) string

func LogDiff

func LogDiff(old, new string) bool

func Rand

func Rand() *rand.Rand

func RandEscape

func RandEscape(rand *rand.Rand) string

func RandKey

func RandKey(rand *rand.Rand, max int) string

func RandLetters

func RandLetters(rand *rand.Rand, max int) string

func RandLettersRange

func RandLettersRange(rand *rand.Rand, min, max int) string

func RandPoint

func RandPoint(rand *rand.Rand, max int) string

func RandStr

func RandStr(rand *rand.Rand, elements string, min, max int) string

func Trim

func Trim(err error) string

func WaitGroupTimeout

func WaitGroupTimeout(t *testing.T, wg *sync.WaitGroup, timeout time.Duration)

Types

This section is empty.

Jump to

Keyboard shortcuts

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