From 3141ef5b842fe8394dcdd240a9a5aa1e0a3422f7 Mon Sep 17 00:00:00 2001 From: mp-web3 Date: Thu, 21 Dec 2023 18:59:22 +0100 Subject: [PATCH] testGetCapabilitiesIntegral and testGetLimitsIntegral passed --- evm/test/IntegralSwapAdapter.t.sol | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/evm/test/IntegralSwapAdapter.t.sol b/evm/test/IntegralSwapAdapter.t.sol index da467fe..aeb1a42 100644 --- a/evm/test/IntegralSwapAdapter.t.sol +++ b/evm/test/IntegralSwapAdapter.t.sol @@ -234,4 +234,25 @@ contract IntegralSwapAdapterTest is Test, ISwapAdapterTypes { function testSwapBuyIncreasingIntegral() public { executeIncreasingSwapsIntegral(OrderSide.Buy); } + + function testGetCapabilitiesIntegral( + bytes32 pair, + address t0, + address t1 + ) public { + Capability[] memory res = adapter.getCapabilities( + pair, + IERC20(t0), + IERC20(t1) + ); + + assertEq(res.length, 3); + } + + function testGetLimitsIntegral() public { + bytes32 pair = bytes32(bytes20(USDC_WETH_PAIR)); + uint256[] memory limits = adapter.getLimits(pair, USDC, WETH); + + assertEq(limits.length, 4); + } }