From f4f5b841e717bdcd974ca37a9b912f0a56a8f822 Mon Sep 17 00:00:00 2001 From: royvardhan Date: Sat, 22 Feb 2025 01:39:11 +0530 Subject: [PATCH] chore: keep test naming consistent --- foundry/test/LibPrefixLengthEncodedByteArray.t.sol | 4 ++-- foundry/test/executors/UniswapV2Executor.t.sol | 4 ++-- foundry/test/executors/UniswapV3Executor.t.sol | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/foundry/test/LibPrefixLengthEncodedByteArray.t.sol b/foundry/test/LibPrefixLengthEncodedByteArray.t.sol index 811dcc1..ad13463 100644 --- a/foundry/test/LibPrefixLengthEncodedByteArray.t.sol +++ b/foundry/test/LibPrefixLengthEncodedByteArray.t.sol @@ -51,14 +51,14 @@ contract LibPrefixLengthEncodedByteArrayTest is Test { assertEq(this.size(multiple), 3); } - function test_RevertIf_InvalidLength() public { + function testInvalidLength() public { // Length prefix larger than remaining data vm.expectRevert(); bytes memory invalid = hex"0004414243"; this.next(invalid); } - function test_RevertIf_IncompletePrefix() public { + function testIncompletePrefix() public { // Only 1 byte instead of 2 bytes prefix vm.expectRevert(); bytes memory invalid = hex"01"; diff --git a/foundry/test/executors/UniswapV2Executor.t.sol b/foundry/test/executors/UniswapV2Executor.t.sol index bb8c553..01722eb 100644 --- a/foundry/test/executors/UniswapV2Executor.t.sol +++ b/foundry/test/executors/UniswapV2Executor.t.sol @@ -80,7 +80,7 @@ contract UniswapV2ExecutorTest is UniswapV2ExecutorExposed, Test, Constants { uniswapV2Exposed.verifyPairAddress(WETH_DAI_POOL); } - function test_RevertIf_InvalidTarget() public { + function testInvalidTarget() public { address fakePool = address(new FakeUniswapV2Pool(WETH_ADDR, DAI_ADDR)); vm.expectRevert(UniswapV2Executor__InvalidTarget.selector); uniswapV2Exposed.verifyPairAddress(fakePool); @@ -145,7 +145,7 @@ contract UniswapV2ExecutorTest is UniswapV2ExecutorExposed, Test, Constants { assertGe(finalBalance, amountOut); } - function test_RevertIf_Swap_InvalidTarget() public { + function testSwapFailureInvalidTarget() public { uint256 amountIn = 10 ** 18; bool zeroForOne = false; address fakePool = address(new FakeUniswapV2Pool(WETH_ADDR, DAI_ADDR)); diff --git a/foundry/test/executors/UniswapV3Executor.t.sol b/foundry/test/executors/UniswapV3Executor.t.sol index 1691c96..3e39c7c 100644 --- a/foundry/test/executors/UniswapV3Executor.t.sol +++ b/foundry/test/executors/UniswapV3Executor.t.sol @@ -128,7 +128,7 @@ contract UniswapV3ExecutorTest is Test, Constants { assertGe(IERC20(DAI_ADDR).balanceOf(address(this)), expAmountOut); } - function test_RevertIf_InvalidTarget() public { + function testSwapFailureInvalidTarget() public { uint256 amountIn = 10 ** 18; deal(WETH_ADDR, address(uniswapV3Exposed), amountIn); bool zeroForOne = false;