test_helpers

package
v0.0.0-...-13c6ecf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCalculateAmountOutAndIn_InverseRelationship

func TestCalculateAmountOutAndIn_InverseRelationship(
	t *testing.T,
	ctx sdk.Context,
	pool types.PoolI,
	assetInDenom string,
	assetOutDenom string,
	initialCalcOut int64,
	swapFee sdk.Dec,
	errTolerance osmomath.ErrTolerance,
)

func TestCfmmCommonTestSuite

func TestCfmmCommonTestSuite(t *testing.T)

func TestSlippageRelationInGivenOut

func TestSlippageRelationInGivenOut(
	testname string,
	t *testing.T,
	ctx sdk.Context,
	createPoolWithLiquidity func(sdk.Context, sdk.Coins) types.PoolI,
	initLiquidity sdk.Coins,
)

func TestSlippageRelationOutGivenIn

func TestSlippageRelationOutGivenIn(
	testname string,
	t *testing.T,
	ctx sdk.Context,
	createPoolWithLiquidity func(sdk.Context, sdk.Coins) types.PoolI,
	initLiquidity sdk.Coins,
)

func TestSlippageRelationWithLiquidityIncrease

func TestSlippageRelationWithLiquidityIncrease(
	testname string,
	t *testing.T,
	ctx sdk.Context,
	createPoolWithLiquidity func(sdk.Context, sdk.Coins) types.PoolI,
	initLiquidity sdk.Coins,
)

Types

type CfmmCommonTestSuite

type CfmmCommonTestSuite struct {
	suite.Suite
}

CfmmCommonTestSuite is the common test suite struct of Constant Function Market Maker, that pool-models can inherit from.

func (*CfmmCommonTestSuite) CreateTestContext

func (suite *CfmmCommonTestSuite) CreateTestContext() sdk.Context

Jump to

Keyboard shortcuts

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