testutil

package
v0.0.0-...-f8b7a73 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomBytes

func RandomBytes(seed, length int) []byte

RandomBytes返回伪随机确定性结果 因为测试失败必须是可复制的

func RandomReader

func RandomReader(seed, length int) *bytes.Reader

func TempFileWithContent

func TempFileWithContent(t *testing.T, content string) string

tempfilewithcontent是一个助手函数,它创建一个包含以下字符串内容的临时文件,然后关闭文件句柄 它返回完整的文件路径

Types

This section is empty.

Jump to

Keyboard shortcuts

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