Skip to content

Commit

Permalink
test(refactor): rename Merkle_Shared_Integration_Test back to Merkle_…
Browse files Browse the repository at this point in the history
…Integration_Test
  • Loading branch information
smol-ninja committed Aug 2, 2024
1 parent 1bff793 commit e680dc0
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion test/periphery/integration/merkle/Merkle.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ISablierMerkleLT } from "src/periphery/interfaces/ISablierMerkleLT.sol"

import { Periphery_Test } from "../../Periphery.t.sol";

abstract contract Merkle_Shared_Integration_Test is Periphery_Test {
abstract contract Merkle_Integration_Test is Periphery_Test {
function setUp() public virtual override {
super.setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { ISablierMerkleInstant } from "src/periphery/interfaces/ISablierMerkleIn
import { Errors } from "src/periphery/libraries/Errors.sol";
import { MerkleBase } from "src/periphery/types/DataTypes.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract CreateMerkleInstant_Integration_Test is Merkle_Shared_Integration_Test {
contract CreateMerkleInstant_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_CampaignNameTooLong() external {
MerkleBase.ConstructorParams memory baseParams = defaults.baseParams();
uint256 aggregateAmount = defaults.AGGREGATE_AMOUNT();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { ISablierMerkleLL } from "src/periphery/interfaces/ISablierMerkleLL.sol"
import { Errors } from "src/periphery/libraries/Errors.sol";
import { MerkleBase } from "src/periphery/types/DataTypes.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract CreateMerkleLL_Integration_Test is Merkle_Shared_Integration_Test {
contract CreateMerkleLL_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_CampaignNameTooLong() external {
MerkleBase.ConstructorParams memory baseParams = defaults.baseParams();
bool cancelable = defaults.CANCELABLE();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { ISablierMerkleLT } from "src/periphery/interfaces/ISablierMerkleLT.sol"
import { Errors } from "src/periphery/libraries/Errors.sol";
import { MerkleBase, MerkleLT } from "src/periphery/types/DataTypes.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract CreateMerkleLT_Integration_Test is Merkle_Shared_Integration_Test {
contract CreateMerkleLT_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_CampaignNameTooLong() external {
MerkleBase.ConstructorParams memory baseParams = defaults.baseParams();
bool cancelable = defaults.CANCELABLE();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { MAX_UD2x18, ud2x18 } from "@prb/math/src/UD2x18.sol";

import { MerkleLT } from "src/periphery/types/DataTypes.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract IsPercentagesSum100_Integration_Test is Merkle_Shared_Integration_Test {
contract IsPercentagesSum100_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_SumOverflow() public {
MerkleLT.TrancheWithPercentage[] memory tranches = defaults.tranchesWithPercentages();
tranches[0].unlockPercentage = MAX_UD2x18;
Expand Down
4 changes: 2 additions & 2 deletions test/periphery/integration/merkle/instant/claim/claim.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity >=0.8.22 <0.9.0;

import { Errors } from "src/periphery/libraries/Errors.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Claim_Integration_Test is Merkle_Shared_Integration_Test {
contract Claim_Integration_Test is Merkle_Integration_Test {
function test_RevertGiven_CampaignExpired() external {
uint40 expiration = defaults.EXPIRATION();
uint256 warpTime = expiration + 1 seconds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity >=0.8.22 <0.9.0;
import { Errors as CoreErrors } from "src/core/libraries/Errors.sol";
import { Errors } from "src/periphery/libraries/Errors.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Clawback_Integration_Test is Merkle_Shared_Integration_Test {
contract Clawback_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_CallerNotAdmin() external {
resetPrank({ msgSender: users.eve });
vm.expectRevert(abi.encodeWithSelector(CoreErrors.CallerNotAdmin.selector, users.admin, users.eve));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity >=0.8.22 <0.9.0;

import { SablierMerkleInstant } from "src/periphery/SablierMerkleInstant.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Constructor_MerkleInstant_Integration_Test is Merkle_Shared_Integration_Test {
contract Constructor_MerkleInstant_Integration_Test is Merkle_Integration_Test {
/// @dev Needed to prevent "Stack too deep" error
struct Vars {
address actualAdmin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.22 <0.9.0;

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract GetFirstClaimTime_Integration_Test is Merkle_Shared_Integration_Test {
contract GetFirstClaimTime_Integration_Test is Merkle_Integration_Test {
function test_GetFirstClaimTime_BeforeFirstClaim() external view {
uint256 firstClaimTime = merkleInstant.getFirstClaimTime();
assertEq(firstClaimTime, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.22 <0.9.0;

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract HasClaimed_Integration_Test is Merkle_Shared_Integration_Test {
contract HasClaimed_Integration_Test is Merkle_Integration_Test {
function test_HasClaimed_IndexNotInTree() external {
uint256 indexNotInTree = 1337e18;
assertFalse(merkleInstant.hasClaimed(indexNotInTree), "claimed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity >=0.8.22 <0.9.0;

import { ISablierMerkleInstant } from "src/periphery/interfaces/ISablierMerkleInstant.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract HasExpired_Integration_Test is Merkle_Shared_Integration_Test {
contract HasExpired_Integration_Test is Merkle_Integration_Test {
function test_HasExpired_ExpirationZero() external {
ISablierMerkleInstant testLockup = createMerkleInstant({ expiration: 0 });
assertFalse(testLockup.hasExpired(), "campaign expired");
Expand Down
4 changes: 2 additions & 2 deletions test/periphery/integration/merkle/ll/claim/claim.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity >=0.8.22 <0.9.0;
import { Lockup, LockupLinear } from "src/core/types/DataTypes.sol";
import { Errors } from "src/periphery/libraries/Errors.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Claim_Integration_Test is Merkle_Shared_Integration_Test {
contract Claim_Integration_Test is Merkle_Integration_Test {
function test_RevertGiven_CampaignExpired() external {
uint40 expiration = defaults.EXPIRATION();
uint256 warpTime = expiration + 1 seconds;
Expand Down
4 changes: 2 additions & 2 deletions test/periphery/integration/merkle/ll/clawback/clawback.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity >=0.8.22 <0.9.0;
import { Errors as CoreErrors } from "src/core/libraries/Errors.sol";
import { Errors } from "src/periphery/libraries/Errors.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Clawback_Integration_Test is Merkle_Shared_Integration_Test {
contract Clawback_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_CallerNotAdmin() external {
resetPrank({ msgSender: users.eve });
vm.expectRevert(abi.encodeWithSelector(CoreErrors.CallerNotAdmin.selector, users.admin, users.eve));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity >=0.8.22 <0.9.0;
import { LockupLinear } from "src/core/types/DataTypes.sol";
import { SablierMerkleLL } from "src/periphery/SablierMerkleLL.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Constructor_MerkleLL_Integration_Test is Merkle_Shared_Integration_Test {
contract Constructor_MerkleLL_Integration_Test is Merkle_Integration_Test {
/// @dev Needed to prevent "Stack too deep" error
struct Vars {
address actualAdmin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.22 <0.9.0;

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract GetFirstClaimTime_Integration_Test is Merkle_Shared_Integration_Test {
contract GetFirstClaimTime_Integration_Test is Merkle_Integration_Test {
function test_GetFirstClaimTime_BeforeFirstClaim() external view {
uint256 firstClaimTime = merkleLL.getFirstClaimTime();
assertEq(firstClaimTime, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.22 <0.9.0;

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract HasClaimed_Integration_Test is Merkle_Shared_Integration_Test {
contract HasClaimed_Integration_Test is Merkle_Integration_Test {
function test_HasClaimed_IndexNotInTree() external {
uint256 indexNotInTree = 1337e18;
assertFalse(merkleLL.hasClaimed(indexNotInTree), "claimed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity >=0.8.22 <0.9.0;

import { ISablierMerkleLL } from "src/periphery/interfaces/ISablierMerkleLL.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract HasExpired_Integration_Test is Merkle_Shared_Integration_Test {
contract HasExpired_Integration_Test is Merkle_Integration_Test {
function test_HasExpired_ExpirationZero() external {
ISablierMerkleLL testLockup = createMerkleLL({ expiration: 0 });
assertFalse(testLockup.hasExpired(), "campaign expired");
Expand Down
4 changes: 2 additions & 2 deletions test/periphery/integration/merkle/lt/claim/claim.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { MerkleBase, MerkleLT } from "src/periphery/types/DataTypes.sol";
import { MerkleBuilder } from "test/utils/MerkleBuilder.sol";
import { Merkle } from "test/utils/Murky.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Claim_Integration_Test is Merkle, Merkle_Shared_Integration_Test {
contract Claim_Integration_Test is Merkle, Merkle_Integration_Test {
using MerkleBuilder for uint256[];

modifier whenTotalPercentageNotOneHundred() {
Expand Down
4 changes: 2 additions & 2 deletions test/periphery/integration/merkle/lt/clawback/clawback.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity >=0.8.22 <0.9.0;
import { Errors as CoreErrors } from "src/core/libraries/Errors.sol";
import { Errors } from "src/periphery/libraries/Errors.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Clawback_Integration_Test is Merkle_Shared_Integration_Test {
contract Clawback_Integration_Test is Merkle_Integration_Test {
function test_RevertWhen_CallerNotAdmin() external {
resetPrank({ msgSender: users.eve });
vm.expectRevert(abi.encodeWithSelector(CoreErrors.CallerNotAdmin.selector, users.admin, users.eve));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pragma solidity >=0.8.22 <0.9.0;
import { SablierMerkleLT } from "src/periphery/SablierMerkleLT.sol";
import { MerkleLT } from "src/periphery/types/DataTypes.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract Constructor_MerkleLT_Integration_Test is Merkle_Shared_Integration_Test {
contract Constructor_MerkleLT_Integration_Test is Merkle_Integration_Test {
/// @dev Needed to prevent "Stack too deep" error
struct Vars {
address actualAdmin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.22 <0.9.0;

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract GetFirstClaimTime_Integration_Test is Merkle_Shared_Integration_Test {
contract GetFirstClaimTime_Integration_Test is Merkle_Integration_Test {
function test_GetFirstClaimTime_BeforeFirstClaim() external view {
uint256 firstClaimTime = merkleLT.getFirstClaimTime();
assertEq(firstClaimTime, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.22 <0.9.0;

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract HasClaimed_Integration_Test is Merkle_Shared_Integration_Test {
contract HasClaimed_Integration_Test is Merkle_Integration_Test {
function test_HasClaimed_IndexNotInTree() external {
uint256 indexNotInTree = 1337e18;
assertFalse(merkleLT.hasClaimed(indexNotInTree), "claimed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ pragma solidity >=0.8.22 <0.9.0;

import { ISablierMerkleLT } from "src/periphery/interfaces/ISablierMerkleLT.sol";

import { Merkle_Shared_Integration_Test } from "../../Merkle.t.sol";
import { Merkle_Integration_Test } from "../../Merkle.t.sol";

contract HasExpired_Integration_Test is Merkle_Shared_Integration_Test {
contract HasExpired_Integration_Test is Merkle_Integration_Test {
function test_HasExpired_ExpirationZero() external {
ISablierMerkleLT testLockup = createMerkleLT({ expiration: 0 });
assertFalse(testLockup.hasExpired(), "campaign expired");
Expand Down

0 comments on commit e680dc0

Please sign in to comment.