testutil

package
v0.0.0-...-d29d52d Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeAddress

func MakeAddress() cipher.Address

MakeAddress creates a cipher.Address

func PrepareDB

func PrepareDB(t *testing.T) (*dbutil.DB, func())

PrepareDB creates and opens a temporary test DB and returns it with a cleanup callback

func RandBytes

func RandBytes(t *testing.T, n int) []byte

RandBytes returns n random bytes

func RandSHA256

func RandSHA256(t *testing.T) cipher.SHA256

RandSHA256 returns a random SHA256 hash

func RandSig

func RandSig(t *testing.T) cipher.Sig

RandSig returns a random cipher.Sig

func RequireError

func RequireError(t *testing.T, err error, msg string)

RequireError requires that an error is not nil and that its message matches

func SHA256FromHex

func SHA256FromHex(t *testing.T, hex string) cipher.SHA256

SHA256FromHex converts an SHA256 hex string to a cipher.SHA256

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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