testutil

package
v9.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 11 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.

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 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 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) GetAccountsBalances

func (m *MockBankKeeper) GetAccountsBalances(ctx context.Context) []types0.Balance

GetAccountsBalances mocks base method.

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) GetAccountsBalances

func (mr *MockBankKeeperMockRecorder) GetAccountsBalances(ctx interface{}) *gomock.Call

GetAccountsBalances indicates an expected call of GetAccountsBalances.

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 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 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