From 4b47122c66df3bdf67d819d0d80e66c2d7749950 Mon Sep 17 00:00:00 2001 From: dyedm1 Date: Wed, 22 Nov 2023 14:20:08 -0500 Subject: [PATCH] test: add identifiers --- test/foundry/core/PanopticPool.t.sol | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/foundry/core/PanopticPool.t.sol b/test/foundry/core/PanopticPool.t.sol index 0ef7642..06b00dc 100644 --- a/test/foundry/core/PanopticPool.t.sol +++ b/test/foundry/core/PanopticPool.t.sol @@ -4988,14 +4988,16 @@ contract PanopticPoolTest is PositionUtils { int256(uint256(type(uint104).max)) - (exerciseFeeAmounts[0] < 0 ? -1 : int8(1)) * int256(ct0.convertToShares(uint256(Math.abs(exerciseFeeAmounts[0])))), - 10 + 10, + "Incorrect Exercise Fees 0 for Bob" ); assertApproxEqAbs( int256(ct1.balanceOf(Bob)), int256(uint256(type(uint104).max)) - (exerciseFeeAmounts[1] < 0 ? -1 : int8(1)) * int256(ct1.convertToShares(uint256(Math.abs(exerciseFeeAmounts[1])))), - 10 + 10, + "Incorrect Exercise Fees 1 for Bob" ); assertEq(sfpm.balanceOf(address(pp), tokenId), 0); @@ -5005,7 +5007,8 @@ contract PanopticPoolTest is PositionUtils { assertApproxEqAbs( inAMM, uint128(longAmounts.rightSlot() + shortAmounts.rightSlot()) * 2, - 10 + 10, + "Incorrect token0 inAMM amount" ); } @@ -5014,7 +5017,8 @@ contract PanopticPoolTest is PositionUtils { assertApproxEqAbs( inAMM, uint128(longAmounts.leftSlot() + shortAmounts.leftSlot()) * 2, - 10 + 10, + "Incorrect token1 inAMM amount" ); } { @@ -5048,12 +5052,16 @@ contract PanopticPoolTest is PositionUtils { uint256(int256(lastCollateralBalance0[Alice]) + $balanceDelta0), uint256( int256((longAmounts.rightSlot() + shortAmounts.rightSlot()) / 1_000_000 + 10) - ) + ), + "Incorrect Collateral 0 Balance for Alice" ); assertApproxEqAbs( ct1.convertToAssets(ct1.balanceOf(Alice)), uint256(int256(lastCollateralBalance1[Alice]) + $balanceDelta1), - uint256(int256((longAmounts.leftSlot() + shortAmounts.leftSlot()) / 1_000_000 + 10)) + uint256( + int256((longAmounts.leftSlot() + shortAmounts.leftSlot()) / 1_000_000 + 10) + ), + "Incorrect Collateral 1 Balance for Alice" ); } }