testutil

package
v11.0.0 Latest Latest
Warning

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

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

Documentation

Overview

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileMust

func CompileMust(ctx context.Context, i *prolog.Interpreter, s string, args ...interface{})

CompileMust compiles the given source code and panics if it fails. This is a convenience function for testing.

func MockAuthQueryServiceWithAddresses

func MockAuthQueryServiceWithAddresses(mock *MockAuthQueryService, addresses []string)

func MockAuthQueryServiceWithError

func MockAuthQueryServiceWithError(mock *MockAuthQueryService, err error)

func NewComprehensiveInterpreterMust

func NewComprehensiveInterpreterMust(ctx context.Context) (i *prolog.Interpreter)

NewComprehensiveInterpreterMust returns a new Interpreter with the given context or panics if it fails. The Interpreter is configured with the full bootstrap but with a minimal set of predicates.

func NewLightInterpreterMust

func NewLightInterpreterMust(ctx context.Context) (i *prolog.Interpreter)

NewLightInterpreterMust returns a new Interpreter with the given context or panics if it fails. The Interpreter is configured with minimal settings to support testing.

func ReindexUnknownVariables

func ReindexUnknownVariables(s prolog.TermString) prolog.TermString

ReindexUnknownVariables reindexes the variables in the given term so that the variables are numbered sequentially. This is required for test predictability when the term is a result of a query and the variables are unknown.

For example, the following term:

foo(_1, _2, _3, _1)

is re-indexed as:

foo(_1, _2, _3, _4)

func ShouldBeGrounded

func ShouldBeGrounded(actual any, expected ...any) string

ShouldBeGrounded is a goconvey assertion that asserts that the given term does not hold any uninstantiated variables.

Types

type MockAccountKeeper

type MockAccountKeeper struct {
	// contains filtered or unexported fields
}

MockAccountKeeper is a mock of AccountKeeper interface.

func NewMockAccountKeeper

func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper

NewMockAccountKeeper creates a new mock instance.

func (*MockAccountKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAccountKeeper) GetAccount

func (m *MockAccountKeeper) GetAccount(ctx context.Context, addr types.AccAddress) types.AccountI

GetAccount mocks base method.

type MockAccountKeeperMockRecorder

type MockAccountKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper.

func (*MockAccountKeeperMockRecorder) GetAccount

func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call

GetAccount indicates an expected call of GetAccount.

type MockAnyUnpacker

type MockAnyUnpacker struct {
	// contains filtered or unexported fields
}

MockAnyUnpacker is a mock of AnyUnpacker interface.

func NewMockAnyUnpacker

func NewMockAnyUnpacker(ctrl *gomock.Controller) *MockAnyUnpacker

NewMockAnyUnpacker creates a new mock instance.

func (*MockAnyUnpacker) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAnyUnpacker) UnpackAny

func (m *MockAnyUnpacker) UnpackAny(any *types.Any, iface interface{}) error

UnpackAny mocks base method.

type MockAnyUnpackerMockRecorder

type MockAnyUnpackerMockRecorder struct {
	// contains filtered or unexported fields
}

MockAnyUnpackerMockRecorder is the mock recorder for MockAnyUnpacker.

func (*MockAnyUnpackerMockRecorder) UnpackAny

func (mr *MockAnyUnpackerMockRecorder) UnpackAny(any, iface interface{}) *gomock.Call

UnpackAny indicates an expected call of UnpackAny.

type MockAuthQueryService

type MockAuthQueryService struct {
	// contains filtered or unexported fields
}

MockAuthQueryService is a mock of AuthQueryService interface.

func NewMockAuthQueryService

func NewMockAuthQueryService(ctrl *gomock.Controller) *MockAuthQueryService

NewMockAuthQueryService creates a new mock instance.

func (*MockAuthQueryService) Accounts

Accounts mocks base method.

func (*MockAuthQueryService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockAuthQueryServiceMockRecorder

type MockAuthQueryServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthQueryServiceMockRecorder is the mock recorder for MockAuthQueryService.

func (*MockAuthQueryServiceMockRecorder) Accounts

func (mr *MockAuthQueryServiceMockRecorder) Accounts(ctx, req interface{}) *gomock.Call

Accounts indicates an expected call of Accounts.

type MockBankKeeper

type MockBankKeeper struct {
	// contains filtered or unexported fields
}

MockBankKeeper is a mock of BankKeeper interface.

func NewMockBankKeeper

func NewMockBankKeeper(ctrl *gomock.Controller) *MockBankKeeper

NewMockBankKeeper creates a new mock instance.

func (*MockBankKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockBankKeeper) GetAllBalances

func (m *MockBankKeeper) GetAllBalances(ctx context.Context, addr types.AccAddress) types.Coins

GetAllBalances mocks base method.

func (*MockBankKeeper) GetBalance

func (m *MockBankKeeper) GetBalance(ctx context.Context, addr types.AccAddress, denom string) types.Coin

GetBalance mocks base method.

func (*MockBankKeeper) LockedCoins

func (m *MockBankKeeper) LockedCoins(ctx context.Context, addr types.AccAddress) types.Coins

LockedCoins mocks base method.

func (*MockBankKeeper) SpendableCoins

func (m *MockBankKeeper) SpendableCoins(ctx context.Context, addr types.AccAddress) types.Coins

SpendableCoins mocks base method.

type MockBankKeeperMockRecorder

type MockBankKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockBankKeeperMockRecorder is the mock recorder for MockBankKeeper.

func (*MockBankKeeperMockRecorder) GetAllBalances

func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call

GetAllBalances indicates an expected call of GetAllBalances.

func (*MockBankKeeperMockRecorder) GetBalance

func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call

GetBalance indicates an expected call of GetBalance.

func (*MockBankKeeperMockRecorder) LockedCoins

func (mr *MockBankKeeperMockRecorder) LockedCoins(ctx, addr interface{}) *gomock.Call

LockedCoins indicates an expected call of LockedCoins.

func (*MockBankKeeperMockRecorder) SpendableCoins

func (mr *MockBankKeeperMockRecorder) SpendableCoins(ctx, addr interface{}) *gomock.Call

SpendableCoins indicates an expected call of SpendableCoins.

type MockFS

type MockFS struct {
	// contains filtered or unexported fields
}

MockFS is a mock of FS interface.

func NewMockFS

func NewMockFS(ctrl *gomock.Controller) *MockFS

NewMockFS creates a new mock instance.

func (*MockFS) EXPECT

func (m *MockFS) EXPECT() *MockFSMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockFS) Open

func (m *MockFS) Open(arg0 string) (fs.File, error)

Open mocks base method.

type MockFSMockRecorder

type MockFSMockRecorder struct {
	// contains filtered or unexported fields
}

MockFSMockRecorder is the mock recorder for MockFS.

func (*MockFSMockRecorder) Open

func (mr *MockFSMockRecorder) Open(arg0 interface{}) *gomock.Call

Open indicates an expected call of Open.

type MockGasMeter

type MockGasMeter struct {
	// contains filtered or unexported fields
}

MockGasMeter is a mock of GasMeter interface.

func NewMockGasMeter

func NewMockGasMeter(ctrl *gomock.Controller) *MockGasMeter

NewMockGasMeter creates a new mock instance.

func (*MockGasMeter) ConsumeGas

func (m *MockGasMeter) ConsumeGas(arg0 uint64, arg1 string)

ConsumeGas mocks base method.

func (*MockGasMeter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockGasMeter) GasConsumed

func (m *MockGasMeter) GasConsumed() uint64

GasConsumed mocks base method.

func (*MockGasMeter) GasConsumedToLimit

func (m *MockGasMeter) GasConsumedToLimit() uint64

GasConsumedToLimit mocks base method.

func (*MockGasMeter) GasRemaining

func (m *MockGasMeter) GasRemaining() uint64

GasRemaining mocks base method.

func (*MockGasMeter) IsOutOfGas

func (m *MockGasMeter) IsOutOfGas() bool

IsOutOfGas mocks base method.

func (*MockGasMeter) IsPastLimit

func (m *MockGasMeter) IsPastLimit() bool

IsPastLimit mocks base method.

func (*MockGasMeter) Limit

func (m *MockGasMeter) Limit() uint64

Limit mocks base method.

func (*MockGasMeter) RefundGas

func (m *MockGasMeter) RefundGas(arg0 uint64, arg1 string)

RefundGas mocks base method.

func (*MockGasMeter) String

func (m *MockGasMeter) String() string

String mocks base method.

type MockGasMeterMockRecorder

type MockGasMeterMockRecorder struct {
	// contains filtered or unexported fields
}

MockGasMeterMockRecorder is the mock recorder for MockGasMeter.

func (*MockGasMeterMockRecorder) ConsumeGas

func (mr *MockGasMeterMockRecorder) ConsumeGas(arg0, arg1 interface{}) *gomock.Call

ConsumeGas indicates an expected call of ConsumeGas.

func (*MockGasMeterMockRecorder) GasConsumed

func (mr *MockGasMeterMockRecorder) GasConsumed() *gomock.Call

GasConsumed indicates an expected call of GasConsumed.

func (*MockGasMeterMockRecorder) GasConsumedToLimit

func (mr *MockGasMeterMockRecorder) GasConsumedToLimit() *gomock.Call

GasConsumedToLimit indicates an expected call of GasConsumedToLimit.

func (*MockGasMeterMockRecorder) GasRemaining

func (mr *MockGasMeterMockRecorder) GasRemaining() *gomock.Call

GasRemaining indicates an expected call of GasRemaining.

func (*MockGasMeterMockRecorder) IsOutOfGas

func (mr *MockGasMeterMockRecorder) IsOutOfGas() *gomock.Call

IsOutOfGas indicates an expected call of IsOutOfGas.

func (*MockGasMeterMockRecorder) IsPastLimit

func (mr *MockGasMeterMockRecorder) IsPastLimit() *gomock.Call

IsPastLimit indicates an expected call of IsPastLimit.

func (*MockGasMeterMockRecorder) Limit

func (mr *MockGasMeterMockRecorder) Limit() *gomock.Call

Limit indicates an expected call of Limit.

func (*MockGasMeterMockRecorder) RefundGas

func (mr *MockGasMeterMockRecorder) RefundGas(arg0, arg1 interface{}) *gomock.Call

RefundGas indicates an expected call of RefundGas.

func (*MockGasMeterMockRecorder) String

func (mr *MockGasMeterMockRecorder) String() *gomock.Call

String indicates an expected call of String.

type MockInterfaceRegistry

type MockInterfaceRegistry struct {
	// contains filtered or unexported fields
}

MockInterfaceRegistry is a mock of InterfaceRegistry interface.

func NewMockInterfaceRegistry

func NewMockInterfaceRegistry(ctrl *gomock.Controller) *MockInterfaceRegistry

NewMockInterfaceRegistry creates a new mock instance.

func (*MockInterfaceRegistry) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInterfaceRegistry) EnsureRegistered

func (m *MockInterfaceRegistry) EnsureRegistered(iface interface{}) error

EnsureRegistered mocks base method.

func (*MockInterfaceRegistry) FindDescriptorByName

func (m *MockInterfaceRegistry) FindDescriptorByName(arg0 protoreflect.FullName) (protoreflect.Descriptor, error)

FindDescriptorByName mocks base method.

func (*MockInterfaceRegistry) FindFileByPath

func (m *MockInterfaceRegistry) FindFileByPath(arg0 string) (protoreflect.FileDescriptor, error)

FindFileByPath mocks base method.

func (*MockInterfaceRegistry) ListAllInterfaces

func (m *MockInterfaceRegistry) ListAllInterfaces() []string

ListAllInterfaces mocks base method.

func (*MockInterfaceRegistry) ListImplementations

func (m *MockInterfaceRegistry) ListImplementations(ifaceTypeURL string) []string

ListImplementations mocks base method.

func (*MockInterfaceRegistry) RangeFiles

func (m *MockInterfaceRegistry) RangeFiles(f func(protoreflect.FileDescriptor) bool)

RangeFiles mocks base method.

func (*MockInterfaceRegistry) RegisterImplementations

func (m *MockInterfaceRegistry) RegisterImplementations(iface interface{}, impls ...proto.Message)

RegisterImplementations mocks base method.

func (*MockInterfaceRegistry) RegisterInterface

func (m *MockInterfaceRegistry) RegisterInterface(protoName string, iface interface{}, impls ...proto.Message)

RegisterInterface mocks base method.

func (*MockInterfaceRegistry) Resolve

func (m *MockInterfaceRegistry) Resolve(typeUrl string) (proto.Message, error)

Resolve mocks base method.

func (*MockInterfaceRegistry) SigningContext

func (m *MockInterfaceRegistry) SigningContext() *signing.Context

SigningContext mocks base method.

func (*MockInterfaceRegistry) UnpackAny

func (m *MockInterfaceRegistry) UnpackAny(any *types.Any, iface interface{}) error

UnpackAny mocks base method.

type MockInterfaceRegistryMockRecorder

type MockInterfaceRegistryMockRecorder struct {
	// contains filtered or unexported fields
}

MockInterfaceRegistryMockRecorder is the mock recorder for MockInterfaceRegistry.

func (*MockInterfaceRegistryMockRecorder) EnsureRegistered

func (mr *MockInterfaceRegistryMockRecorder) EnsureRegistered(iface interface{}) *gomock.Call

EnsureRegistered indicates an expected call of EnsureRegistered.

func (*MockInterfaceRegistryMockRecorder) FindDescriptorByName

func (mr *MockInterfaceRegistryMockRecorder) FindDescriptorByName(arg0 interface{}) *gomock.Call

FindDescriptorByName indicates an expected call of FindDescriptorByName.

func (*MockInterfaceRegistryMockRecorder) FindFileByPath

func (mr *MockInterfaceRegistryMockRecorder) FindFileByPath(arg0 interface{}) *gomock.Call

FindFileByPath indicates an expected call of FindFileByPath.

func (*MockInterfaceRegistryMockRecorder) ListAllInterfaces

func (mr *MockInterfaceRegistryMockRecorder) ListAllInterfaces() *gomock.Call

ListAllInterfaces indicates an expected call of ListAllInterfaces.

func (*MockInterfaceRegistryMockRecorder) ListImplementations

func (mr *MockInterfaceRegistryMockRecorder) ListImplementations(ifaceTypeURL interface{}) *gomock.Call

ListImplementations indicates an expected call of ListImplementations.

func (*MockInterfaceRegistryMockRecorder) RangeFiles

func (mr *MockInterfaceRegistryMockRecorder) RangeFiles(f interface{}) *gomock.Call

RangeFiles indicates an expected call of RangeFiles.

func (*MockInterfaceRegistryMockRecorder) RegisterImplementations

func (mr *MockInterfaceRegistryMockRecorder) RegisterImplementations(iface interface{}, impls ...interface{}) *gomock.Call

RegisterImplementations indicates an expected call of RegisterImplementations.

func (*MockInterfaceRegistryMockRecorder) RegisterInterface

func (mr *MockInterfaceRegistryMockRecorder) RegisterInterface(protoName, iface interface{}, impls ...interface{}) *gomock.Call

RegisterInterface indicates an expected call of RegisterInterface.

func (*MockInterfaceRegistryMockRecorder) Resolve

func (mr *MockInterfaceRegistryMockRecorder) Resolve(typeUrl interface{}) *gomock.Call

Resolve indicates an expected call of Resolve.

func (*MockInterfaceRegistryMockRecorder) SigningContext

func (mr *MockInterfaceRegistryMockRecorder) SigningContext() *gomock.Call

SigningContext indicates an expected call of SigningContext.

func (*MockInterfaceRegistryMockRecorder) UnpackAny

func (mr *MockInterfaceRegistryMockRecorder) UnpackAny(any, iface interface{}) *gomock.Call

UnpackAny indicates an expected call of UnpackAny.

type MockReadFileFS

type MockReadFileFS struct {
	// contains filtered or unexported fields
}

MockReadFileFS is a mock of ReadFileFS interface.

func NewMockReadFileFS

func NewMockReadFileFS(ctrl *gomock.Controller) *MockReadFileFS

NewMockReadFileFS creates a new mock instance.

func (*MockReadFileFS) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockReadFileFS) Open

func (m *MockReadFileFS) Open(arg0 string) (fs.File, error)

Open mocks base method.

func (*MockReadFileFS) ReadFile

func (m *MockReadFileFS) ReadFile(arg0 string) ([]byte, error)

ReadFile mocks base method.

type MockReadFileFSMockRecorder

type MockReadFileFSMockRecorder struct {
	// contains filtered or unexported fields
}

MockReadFileFSMockRecorder is the mock recorder for MockReadFileFS.

func (*MockReadFileFSMockRecorder) Open

func (mr *MockReadFileFSMockRecorder) Open(arg0 interface{}) *gomock.Call

Open indicates an expected call of Open.

func (*MockReadFileFSMockRecorder) ReadFile

func (mr *MockReadFileFSMockRecorder) ReadFile(arg0 interface{}) *gomock.Call

ReadFile indicates an expected call of ReadFile.

type MockUnpackInterfacesMessage

type MockUnpackInterfacesMessage struct {
	// contains filtered or unexported fields
}

MockUnpackInterfacesMessage is a mock of UnpackInterfacesMessage interface.

func NewMockUnpackInterfacesMessage

func NewMockUnpackInterfacesMessage(ctrl *gomock.Controller) *MockUnpackInterfacesMessage

NewMockUnpackInterfacesMessage creates a new mock instance.

func (*MockUnpackInterfacesMessage) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUnpackInterfacesMessage) UnpackInterfaces

func (m *MockUnpackInterfacesMessage) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces mocks base method.

type MockUnpackInterfacesMessageMockRecorder

type MockUnpackInterfacesMessageMockRecorder struct {
	// contains filtered or unexported fields
}

MockUnpackInterfacesMessageMockRecorder is the mock recorder for MockUnpackInterfacesMessage.

func (*MockUnpackInterfacesMessageMockRecorder) UnpackInterfaces

func (mr *MockUnpackInterfacesMessageMockRecorder) UnpackInterfaces(unpacker interface{}) *gomock.Call

UnpackInterfaces indicates an expected call of UnpackInterfaces.

type MockWasmKeeper

type MockWasmKeeper struct {
	// contains filtered or unexported fields
}

MockWasmKeeper is a mock of WasmKeeper interface.

func NewMockWasmKeeper

func NewMockWasmKeeper(ctrl *gomock.Controller) *MockWasmKeeper

NewMockWasmKeeper creates a new mock instance.

func (*MockWasmKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockWasmKeeper) QuerySmart

func (m *MockWasmKeeper) QuerySmart(ctx context.Context, contractAddr types.AccAddress, req []byte) ([]byte, error)

QuerySmart mocks base method.

type MockWasmKeeperMockRecorder

type MockWasmKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockWasmKeeperMockRecorder is the mock recorder for MockWasmKeeper.

func (*MockWasmKeeperMockRecorder) QuerySmart

func (mr *MockWasmKeeperMockRecorder) QuerySmart(ctx, contractAddr, req interface{}) *gomock.Call

QuerySmart indicates an expected call of QuerySmart.

type TermResults

type TermResults map[string]prolog.TermString

Jump to

Keyboard shortcuts

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