Skip to content

Commit

Permalink
naming, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-carroll committed Nov 17, 2023
1 parent a9ab358 commit d57d76f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ contract ContractOffersNativeTokenOfferItems is

TestERC721 erc721;

function setUp() public override snapshotted {
function setUp() public override snapshotSetup {
super.setUp();
erc721 = new TestERC721();
}
Expand Down
8 changes: 4 additions & 4 deletions test/foundry/utils/DifferentialTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d57d76f

Please sign in to comment.