testutil

package
v0.0.0-...-9802667 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) (*bolt.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 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