test_helpers

package
v20.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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.CFMMPoolI,
	assetInDenom string,
	assetOutDenom string,
	initialCalcOut int64,
	spreadFactor osmomath.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.CFMMPoolI,
	initLiquidity sdk.Coins,
)

func TestSlippageRelationOutGivenIn

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

func TestSlippageRelationWithLiquidityIncrease

func TestSlippageRelationWithLiquidityIncrease(
	testname string,
	t *testing.T,
	ctx sdk.Context,
	createPoolWithLiquidity func(sdk.Context, sdk.Coins) types.CFMMPoolI,
	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