Documentation ¶
Overview ¶
Package test defines any testing constants or functions used to validate assumptions.
Index ¶
- Constants
- func DeepClone(src, dest interface{})
- func ForMethodNamed(s interface{}, m string) func(t *testing.T)
- func MethodReturnsSelfType(s interface{}, m string, args []interface{}) func(t *testing.T)
- func MethodReturnsType(s, r interface{}, m string, args []interface{}) func(t *testing.T)
- func RandomStringFromRunes(seed int64, n uint, valid []rune) string
- func RandomWeightedString(seed int64, n uint, weights map[rune]uint) string
Constants ¶
View Source
const Seed int64 = 1234
Seed is a chosen value that should be used to seed pseudorandom number generators
Variables ¶
This section is empty.
Functions ¶
func DeepClone ¶
func DeepClone(src, dest interface{})
DeepClone does a deep copy from one src to one dest Note: DeepClone copies only the public parts of a struct
func ForMethodNamed ¶
ForMethodNamed is a test helper that wraps a check for method by name
func MethodReturnsSelfType ¶
MethodReturnsSelfType checks that calling s.m(args...) return type s
func MethodReturnsType ¶
MethodReturnsType checks that s.m(args...) returns type r
func RandomStringFromRunes ¶
RandomStringFromRunes generates a random string of length n from the supplied valid runes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.