Update other failing tests
This commit is contained in:
@@ -19,9 +19,10 @@ contract AdapterTest is Test, ISwapAdapterTypes {
|
||||
// sell amounts. Asserts that the prices behaves as expected.
|
||||
// @param adapter The swap adapter to test
|
||||
// @param poolIds The list of pool ids to test
|
||||
function testPoolBehaviour(ISwapAdapter adapter, bytes32[] memory poolIds)
|
||||
public
|
||||
{
|
||||
function runPoolBehaviourTest(
|
||||
ISwapAdapter adapter,
|
||||
bytes32[] memory poolIds
|
||||
) public {
|
||||
bool hasPriceImpact = !hasCapability(
|
||||
adapter.getCapabilities(poolIds[0], address(0), address(0)),
|
||||
Capability.ConstantPrice
|
||||
|
||||
@@ -207,7 +207,7 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
{
|
||||
Capability[] memory res = adapter.getCapabilities(pool, t0, t1);
|
||||
|
||||
assertEq(res.length, 3);
|
||||
assertEq(res.length, 4);
|
||||
assertEq(uint256(res[0]), uint256(Capability.SellOrder));
|
||||
assertEq(uint256(res[1]), uint256(Capability.BuyOrder));
|
||||
assertEq(uint256(res[2]), uint256(Capability.PriceFunction));
|
||||
@@ -232,6 +232,6 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
function testBalancerV2PoolBehaviour() public {
|
||||
bytes32[] memory poolIds = new bytes32[](1);
|
||||
poolIds[0] = B_80BAL_20WETH_POOL_ID;
|
||||
testPoolBehaviour(adapter, poolIds);
|
||||
runPoolBehaviourTest(adapter, poolIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ contract UniswapV2PairFunctionTest is AdapterTest {
|
||||
function testGetCapabilities(bytes32 pair, address t0, address t1) public {
|
||||
Capability[] memory res = adapter.getCapabilities(pair, t0, t1);
|
||||
|
||||
assertEq(res.length, 3);
|
||||
assertEq(res.length, 4);
|
||||
}
|
||||
|
||||
function testGetLimits() public {
|
||||
@@ -164,6 +164,6 @@ contract UniswapV2PairFunctionTest is AdapterTest {
|
||||
function testUsv2PoolBehaviour() public {
|
||||
bytes32[] memory poolIds = new bytes32[](1);
|
||||
poolIds[0] = bytes32(bytes20(USDC_WETH_PAIR));
|
||||
testPoolBehaviour(adapter, poolIds);
|
||||
runPoolBehaviourTest(adapter, poolIds);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user