testutil

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README

Testutil Directory

The x/testutil directory is not a cosmos-sdk module perse, but a collection of test utilities to make testing the other x/modules.

Documentation

Overview

Package nullify provides methods to init nil values structs for test assertion.

Index

Constants

This section is empty.

Variables

View Source
var Latin = TypeLatin{
	Letters:    "abcdefghijklmnopqrstuvwxyz",
	CapLetters: "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
	Numbers:    "0123456789",
}

Functions

func AccAddress added in v0.15.0

func AccAddress() sdk.AccAddress

AccAddress Returns a sample account address (sdk.AccAddress) Note that AccAddress().String() can be used to get a string representation.

func BlankContext added in v0.16.1

func BlankContext(storeKeyName string) sdk.Context

func Fill added in v0.15.0

func Fill(x interface{}) interface{}

Fill analyze all struct fields and slices with reflection and initialize the nil and empty slices, structs, and pointers.

func PrivKeyAddressPairs added in v0.15.0

func PrivKeyAddressPairs(n int) (keys []cryptotypes.PrivKey, addrs []sdk.AccAddress)

PrivKeyAddressPairs generates (deterministically) a total of n private keys and addresses.

func RandStringBytes added in v0.16.1

func RandStringBytes(n int) string

func RequireContainsTypedEvent added in v0.15.0

func RequireContainsTypedEvent(t require.TestingT, ctx sdk.Context, event proto.Message)

func RequireHasTypedEvent added in v0.15.0

func RequireHasTypedEvent(t require.TestingT, ctx sdk.Context, event proto.Message)

func RequireNotHasTypedEvent added in v0.15.0

func RequireNotHasTypedEvent(t require.TestingT, ctx sdk.Context, event proto.Message)

Types

type TypeLatin added in v0.16.1

type TypeLatin struct {
	Letters    string
	CapLetters string
	Numbers    string
}

Directories

Path Synopsis
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
Package network implements and exposes a fully operational in-process Tendermint test network that consists of at least one or potentially many validators.
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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