testutils

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package testutils provides general purpose utility functions for unit/integration testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes []abci.EventAttribute

Attributes wraps sdk.EventAttribute

func (Attributes) Filter

func (attributes Attributes) Filter(predicate func(abci.EventAttribute) bool) Attributes

Filter returns a collection of attributes filtered by the predicate

type ErrorCache

type ErrorCache struct {
	Error error
}

ErrorCache is a struct that can be used to get at the error that is emitted by test assertions when passing it instead ot *testing.T

func (*ErrorCache) Errorf

func (ec *ErrorCache) Errorf(format string, args ...interface{})

Errorf records the given formatted string as an erro

type Events

type Events []abci.Event

Events wraps sdk.Events

func (Events) Filter

func (fe Events) Filter(predicate func(events abci.Event) bool) Events

Filter returns a collection of events filtered by the predicate

type Func

type Func func(t *testing.T)

Func wraps a regular testing function so it can be used as a pointer function receiver

func (Func) Repeat

func (f Func) Repeat(n int) Func

Repeat executes the testing function n times

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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