From d57d76ff925fba23157b1eff11ac871580cb57bf Mon Sep 17 00:00:00 2001 From: Anna Carroll Date: Fri, 17 Nov 2023 14:45:20 +0300 Subject: [PATCH] naming, comments --- .../offerers/ContractOffersNativeTokenOfferItems.t.sol | 2 +- test/foundry/utils/DifferentialTest.sol | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/foundry/offerers/ContractOffersNativeTokenOfferItems.t.sol b/test/foundry/offerers/ContractOffersNativeTokenOfferItems.t.sol index e0bcc0a4e..556f559d7 100644 --- a/test/foundry/offerers/ContractOffersNativeTokenOfferItems.t.sol +++ b/test/foundry/offerers/ContractOffersNativeTokenOfferItems.t.sol @@ -62,7 +62,7 @@ contract ContractOffersNativeTokenOfferItems is TestERC721 erc721; - function setUp() public override snapshotted { + function setUp() public override snapshotSetup { super.setUp(); erc721 = new TestERC721(); } diff --git a/test/foundry/utils/DifferentialTest.sol b/test/foundry/utils/DifferentialTest.sol index 0b9c2436e..1b52be7a2 100644 --- a/test/foundry/utils/DifferentialTest.sol +++ b/test/foundry/utils/DifferentialTest.sol @@ -27,14 +27,14 @@ contract DifferentialTest is Test { revert RevertWithFailureStatus(readHevmFailureSlot()); } - /// @notice setup the snapshot at the end of the setUp function - /// @dev apply modifier to `setUp` function, then run differential tests using `revertToSetup` - modifier snapshotted() { + /// @notice snapshot the chain state at the end of a `setUp` function + /// @dev apply modifier to the `setUp` function in order to use `revertToSetup` in differential tests + modifier snapshotSetup() { _; snapshot = vm.snapshot(); } - /// @notice revert to the state at the end of setUp + /// @notice revert to chain state established in the `setUp` function function revertToSetup() public { vm.revertTo(snapshot); }