Skip to content

Commit

Permalink
test: remove duplicated modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
andreivladbrg committed May 24, 2024
1 parent aa97680 commit 261c1e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ contract AdjustRatePerSecond_Integration_Test is Integration_Test {
givenNotNull
givenNotCanceled
whenCallerAuthorized
whenRatePerSecondNonZero
whenRatePerSecondIsNotZero
{
vm.expectRevert(
abi.encodeWithSelector(Errors.SablierV2OpenEnded_RatePerSecondNotDifferent.selector, RATE_PER_SECOND)
Expand All @@ -86,7 +86,7 @@ contract AdjustRatePerSecond_Integration_Test is Integration_Test {
givenNotNull
givenNotCanceled
whenCallerAuthorized
whenRatePerSecondNonZero
whenRatePerSecondIsNotZero
whenRatePerSecondNotDifferent
{
vm.warp({ newTimestamp: WARP_ONE_MONTH });
Expand Down
12 changes: 6 additions & 6 deletions test/integration/create/create.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ contract Create_Integration_Test is Integration_Test {
});
}

function test_RevertWhen_RecipientZeroAddress() external whenNotDelegateCalled whenSenderNonZeroAddress {
function test_RevertWhen_RecipientZeroAddress() external whenNotDelegateCalled whenSenderIsNotZeroAddress {
vm.expectRevert(abi.encodeWithSelector(IERC721Errors.ERC721InvalidReceiver.selector, address(0)));
openEnded.create({
sender: users.sender,
Expand All @@ -47,7 +47,7 @@ contract Create_Integration_Test is Integration_Test {
function test_RevertWhen_ratePerSecondZero()
external
whenNotDelegateCalled
whenSenderNonZeroAddress
whenSenderIsNotZeroAddress
whenRecipientNonZeroAddress
{
vm.expectRevert(Errors.SablierV2OpenEnded_RatePerSecondZero.selector);
Expand All @@ -63,9 +63,9 @@ contract Create_Integration_Test is Integration_Test {
function test_RevertWhen_AssetNotContract()
external
whenNotDelegateCalled
whenSenderNonZeroAddress
whenSenderIsNotZeroAddress
whenRecipientNonZeroAddress
whenRatePerSecondNonZero
whenRatePerSecondIsNotZero
{
address nonContract = address(8128);
vm.expectRevert(
Expand All @@ -83,9 +83,9 @@ contract Create_Integration_Test is Integration_Test {
function test_Create()
external
whenNotDelegateCalled
whenSenderNonZeroAddress
whenSenderIsNotZeroAddress
whenRecipientNonZeroAddress
whenRatePerSecondNonZero
whenRatePerSecondIsNotZero
whenAssetContract
{
uint256 expectedStreamId = openEnded.nextStreamId();
Expand Down
2 changes: 1 addition & 1 deletion test/integration/restart-stream/restartStream.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ contract RestartStream_Integration_Test is Integration_Test {
givenNotNull
givenCanceled
whenCallerAuthorized
whenRatePerSecondNonZero
whenRatePerSecondIsNotZero
{
vm.expectEmit({ emitter: address(openEnded) });
emit RestartOpenEndedStream({
Expand Down
8 changes: 0 additions & 8 deletions test/utils/Modifiers.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ abstract contract Modifiers {
_;
}

modifier whenRatePerSecondNonZero() {
_;
}

modifier whenRatePerSecondIsNotZero() {
_;
}
Expand Down Expand Up @@ -106,10 +102,6 @@ abstract contract Modifiers {
_;
}

modifier whenSenderNonZeroAddress() {
_;
}

/*//////////////////////////////////////////////////////////////////////////
DEPOSIT
//////////////////////////////////////////////////////////////////////////*/
Expand Down

0 comments on commit 261c1e3

Please sign in to comment.