From 925630dd28f4a47ff2883b281af812f9958b957e Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Wed, 23 Aug 2023 20:29:19 +0300 Subject: [PATCH] test: use "given" keyword in branching trees (#656) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: using Given keyword in branching Trees (#641) * Using Given keyword on the branching trees (cherry picked from commit d365705bfdbda3334409bc5b5a2b1821e22aac32) * test: use "it" for test nodes --------- Co-authored-by: Paul Razvan Berg test: rename to "givenCallerAdmin" test: use given keyword in the integration branching trees test: use given keyword for modifiers for fuzz tests test: use given keyword in test contracts and brancing trees test: refactor test function names to use Given and When test: refactor test function names to use Given and When refactor: reverting in dev comments refactor: rename test function names to cleaner form test: polish branching trees test: improve "mapSymbol" tree test: improve "safeAssetDecimals" tree test: improve "safeAssetSymbol" tree * refactor: givenWithdrawableAmountNotZero modifier name * test: use "when" for time-related branches * test: address feedback in tree wording branch * test: polish branching trees * fix: remove duplicated branch in createWithMilestones.tree --------- Co-authored-by: Shub Co-authored-by: andreivladbrg Co-authored-by: Alexander González --- .../protocol-fees/protocolFees.t.sol | 4 +- .../protocol-fees/protocolFees.tree | 4 +- .../toggle-flash-asset/toggleFlashAsset.t.sol | 4 +- .../toggle-flash-asset/toggleFlashAsset.tree | 4 +- .../flash-loan/flash-fee/flashFee.t.sol | 6 +- .../flash-loan/flash-fee/flashFee.tree | 4 +- .../flash-loan/flash-loan/flashLoan.t.sol | 10 +- .../flash-loan/flash-loan/flashLoan.tree | 6 +- .../max-flash-loan/maxFlashLoan.t.sol | 4 +- .../max-flash-loan/maxFlashLoan.tree | 4 +- .../createWithMilestones.t.sol | 12 +- .../createWithMilestones.tree | 6 +- .../lockup-dynamic/get-range/getRange.t.sol | 6 +- .../lockup-dynamic/get-range/getRange.tree | 4 +- .../get-segments/getSegments.t.sol | 6 +- .../get-segments/getSegments.tree | 4 +- .../lockup-dynamic/get-stream/getStream.t.sol | 10 +- .../lockup-dynamic/get-stream/getStream.tree | 8 +- .../streamed-amount-of/streamedAmountOf.t.sol | 36 ++--- .../streamed-amount-of/streamedAmountOf.tree | 6 +- .../lockup-dynamic/token-uri/tokenURI.t.sol | 8 +- .../lockup-dynamic/token-uri/tokenURI.tree | 4 +- .../withdrawableAmountOf.t.sol | 18 +-- .../withdrawableAmountOf.tree | 6 +- .../create-with-range/createWithRange.t.sol | 12 +- .../create-with-range/createWithRange.tree | 4 +- .../get-cliff-time/getCliffTime.t.sol | 6 +- .../get-cliff-time/getCliffTime.tree | 4 +- .../lockup-linear/get-range/getRange.t.sol | 6 +- .../lockup-linear/get-range/getRange.tree | 4 +- .../lockup-linear/get-stream/getStream.t.sol | 10 +- .../lockup-linear/get-stream/getStream.tree | 8 +- .../streamed-amount-of/streamedAmountOf.t.sol | 18 +-- .../streamed-amount-of/streamedAmountOf.tree | 2 +- .../lockup-linear/token-uri/tokenURI.t.sol | 8 +- .../lockup-linear/token-uri/tokenURI.tree | 4 +- .../withdrawableAmountOf.t.sol | 22 +-- .../withdrawableAmountOf.tree | 6 +- .../concrete/lockup/burn/burn.t.sol | 59 ++++---- .../concrete/lockup/burn/burn.tree | 20 +-- .../cancel-multiple/cancelMultiple.t.sol | 50 +++---- .../cancel-multiple/cancelMultiple.tree | 18 +-- .../concrete/lockup/cancel/cancel.t.sol | 134 +++++++++--------- .../concrete/lockup/cancel/cancel.tree | 38 ++--- .../claimProtocolRevenues.t.sol | 6 +- .../claimProtocolRevenues.tree | 4 +- .../concrete/lockup/get-asset/getAsset.t.sol | 6 +- .../concrete/lockup/get-asset/getAsset.tree | 4 +- .../getDepositedAmount.t.sol | 6 +- .../getDepositedAmount.tree | 4 +- .../lockup/get-end-time/getEndTime.t.sol | 6 +- .../lockup/get-end-time/getEndTime.tree | 4 +- .../lockup/get-recipient/getRecipient.t.sol | 10 +- .../lockup/get-recipient/getRecipient.tree | 8 +- .../getRefundedAmount.t.sol | 24 ++-- .../getRefundedAmount.tree | 20 +-- .../lockup/get-sender/getSender.t.sol | 6 +- .../concrete/lockup/get-sender/getSender.tree | 4 +- .../lockup/get-start-time/getStartTime.t.sol | 6 +- .../lockup/get-start-time/getStartTime.tree | 4 +- .../getWithdrawnAmount.t.sol | 6 +- .../getWithdrawnAmount.tree | 8 +- .../lockup/is-cancelable/isCancelable.t.sol | 14 +- .../lockup/is-cancelable/isCancelable.tree | 12 +- .../concrete/lockup/is-cold/isCold.t.sol | 14 +- .../concrete/lockup/is-cold/isCold.tree | 14 +- .../lockup/is-depleted/isDepleted.t.sol | 10 +- .../lockup/is-depleted/isDepleted.tree | 8 +- .../concrete/lockup/is-stream/isStream.t.sol | 4 +- .../concrete/lockup/is-stream/isStream.tree | 4 +- .../concrete/lockup/is-warm/isWarm.t.sol | 14 +- .../concrete/lockup/is-warm/isWarm.tree | 14 +- .../protocol-revenues/protocolRevenues.t.sol | 4 +- .../protocol-revenues/protocolRevenues.tree | 4 +- .../refundableAmountOf.t.sol | 48 +++---- .../refundableAmountOf.tree | 24 ++-- .../concrete/lockup/renounce/renounce.t.sol | 60 ++++---- .../concrete/lockup/renounce/renounce.tree | 22 +-- .../concrete/lockup/status-of/statusOf.t.sol | 34 ++--- .../concrete/lockup/status-of/statusOf.tree | 16 +-- .../streamed-amount-of/streamedAmountOf.t.sol | 16 +-- .../streamed-amount-of/streamedAmountOf.tree | 18 +-- .../lockup/was-canceled/wasCanceled.t.sol | 10 +- .../lockup/was-canceled/wasCanceled.tree | 8 +- .../withdrawMaxAndTransfer.t.sol | 16 +-- .../withdrawMaxAndTransfer.tree | 12 +- .../withdraw-multiple/withdrawMultiple.t.sol | 54 ++++--- .../withdraw-multiple/withdrawMultiple.tree | 12 +- .../concrete/lockup/withdraw/withdraw.t.sol | 84 +++++------ .../concrete/lockup/withdraw/withdraw.tree | 20 +-- .../withdrawableAmountOf.t.sol | 16 +-- .../withdrawableAmountOf.tree | 18 +-- .../nft-descriptor/map-symbol/mapSymbol.t.sol | 8 +- .../nft-descriptor/map-symbol/mapSymbol.tree | 11 +- .../safeAssetDecimals.t.sol | 4 +- .../safeAssetDecimals.tree | 11 +- .../safe-asset-symbol/safeAssetSymbol.t.sol | 26 ++-- .../safe-asset-symbol/safeAssetSymbol.tree | 13 +- .../fuzz/comptroller/setFlashFee.t.sol | 4 +- .../fuzz/comptroller/setProtocolFee.t.sol | 4 +- .../fuzz/flash-loan/flashFee.t.sol | 4 +- .../fuzz/flash-loan/flashLoan.t.sol | 4 +- .../fuzz/flash-loan/maxFlashLoan.t.sol | 4 +- .../lockup-dynamic/createWithMilestones.t.sol | 4 +- .../lockup-dynamic/streamedAmountOf.t.sol | 18 +-- .../fuzz/lockup-dynamic/withdraw.t.sol | 2 +- .../fuzz/lockup-linear/createWithRange.t.sol | 4 +- .../fuzz/lockup-linear/streamedAmountOf.t.sol | 12 +- .../lockup-linear/withdrawableAmountOf.t.sol | 16 +-- test/integration/fuzz/lockup/cancel.t.sol | 30 ++-- .../fuzz/lockup/cancelMultiple.t.sol | 6 +- .../fuzz/lockup/getWithdrawnAmount.t.sol | 6 +- test/integration/fuzz/lockup/withdraw.t.sol | 8 +- .../fuzz/lockup/withdrawMaxAndTransfer.t.sol | 4 +- .../fuzz/lockup/withdrawMultiple.t.sol | 4 +- .../shared/flash-loan/flashLoanFunction.t.sol | 2 +- .../lockup-dynamic/createWithMilestones.t.sol | 2 +- .../lockup-linear/createWithRange.t.sol | 2 +- test/integration/shared/lockup/cancel.t.sol | 18 +-- .../shared/lockup/cancelMultiple.t.sol | 6 +- .../shared/lockup/getWithdrawnAmount.t.sol | 4 +- .../shared/lockup/streamedAmountOf.t.sol | 8 +- test/integration/shared/lockup/withdraw.t.sol | 4 +- .../lockup/withdrawMaxAndTransfer.t.sol | 6 +- .../shared/lockup/withdrawMultiple.t.sol | 4 +- .../shared/lockup/withdrawableAmountOf.t.sol | 8 +- .../transfer-admin/transferAdmin.tree | 8 +- .../comptroller/flash-fee/flashFee.tree | 4 +- 128 files changed, 829 insertions(+), 811 deletions(-) diff --git a/test/integration/concrete/comptroller/protocol-fees/protocolFees.t.sol b/test/integration/concrete/comptroller/protocol-fees/protocolFees.t.sol index 7cd76f917..d7af61c96 100644 --- a/test/integration/concrete/comptroller/protocol-fees/protocolFees.t.sol +++ b/test/integration/concrete/comptroller/protocol-fees/protocolFees.t.sol @@ -19,12 +19,12 @@ contract ProtocolFees_Integration_Concrete_Test is Integration_Test { assertEq(actualProtocolFee, expectedProtocolFee, "protocolFees"); } - modifier whenProtocolFeeSet() { + modifier givenProtocolFeeSet() { comptroller.setProtocolFee({ asset: dai, newProtocolFee: defaults.PROTOCOL_FEE() }); _; } - function test_ProtocolFees() external whenProtocolFeeSet { + function test_ProtocolFees() external givenProtocolFeeSet { UD60x18 actualProtocolFee = comptroller.protocolFees(dai); UD60x18 expectedProtocolFee = defaults.PROTOCOL_FEE(); assertEq(actualProtocolFee, expectedProtocolFee, "protocolFees"); diff --git a/test/integration/concrete/comptroller/protocol-fees/protocolFees.tree b/test/integration/concrete/comptroller/protocol-fees/protocolFees.tree index 1d2e6949b..c2e81b8d8 100644 --- a/test/integration/concrete/comptroller/protocol-fees/protocolFees.tree +++ b/test/integration/concrete/comptroller/protocol-fees/protocolFees.tree @@ -1,5 +1,5 @@ protocolFees.t.sol -├── when the protocol fee has not been set +├── given the protocol fee has not been set │ └── it should return zero -└── when the protocol fee has been set +└── given the protocol fee has been set └── it should return the correct protocol fee diff --git a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol b/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol index ca023d248..98ede2015 100644 --- a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol +++ b/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.t.sol @@ -33,12 +33,12 @@ contract ToggleFlashAsset_Integration_Concrete_Test is Integration_Test { assertTrue(isFlashAsset, "isFlashAsset"); } - modifier whenFlagEnabled() { + modifier givenFlagEnabled() { comptroller.toggleFlashAsset(dai); _; } - function test_ToggleFlashAsset() external whenCallerAdmin whenFlagEnabled { + function test_ToggleFlashAsset() external whenCallerAdmin givenFlagEnabled { // Expect the relevant event to be emitted. vm.expectEmit({ emitter: address(comptroller) }); emit ToggleFlashAsset({ admin: users.admin, asset: dai, newFlag: false }); diff --git a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree b/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree index 7b81e86cb..e6184a843 100644 --- a/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree +++ b/test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree @@ -2,9 +2,9 @@ toggleFlashAsset.t.sol ├── when the caller is not the admin │ └── it should revert └── when the caller is the admin - ├── when the flag is not enabled + ├── given the flag is not enabled │ ├── it should toggle the flash asset │ └── it should emit a {ToggleFlashAsset} event - └── when the flag is enabled + └── given the flag is enabled ├── it should toggle the flash asset └── it should emit a {ToggleFlashAsset} event diff --git a/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol b/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol index 9c98d72c1..f7eaf9f79 100644 --- a/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol +++ b/test/integration/concrete/flash-loan/flash-fee/flashFee.t.sol @@ -8,17 +8,17 @@ import { Errors } from "src/libraries/Errors.sol"; import { FlashLoan_Integration_Shared_Test } from "../../../shared/flash-loan/FlashLoan.t.sol"; contract FlashFee_Integration_Concrete_Test is FlashLoan_Integration_Shared_Test { - function test_RevertWhen_AssetNotFlashLoanable() external { + function test_RevertGiven_AssetNotFlashLoanable() external { vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_AssetNotFlashLoanable.selector, dai)); flashLoan.flashFee({ asset: address(dai), amount: 0 }); } - modifier whenAssetFlashLoanable() { + modifier givenAssetFlashLoanable() { comptroller.toggleFlashAsset(dai); _; } - function test_FlashFee() external whenAssetFlashLoanable { + function test_FlashFee() external givenAssetFlashLoanable { uint256 amount = 782.23e18; uint256 actualFlashFee = flashLoan.flashFee({ asset: address(dai), amount: amount }); uint256 expectedFlashFee = ud(amount).mul(defaults.FLASH_FEE()).intoUint256(); diff --git a/test/integration/concrete/flash-loan/flash-fee/flashFee.tree b/test/integration/concrete/flash-loan/flash-fee/flashFee.tree index 912df3c4f..106525e37 100644 --- a/test/integration/concrete/flash-loan/flash-fee/flashFee.tree +++ b/test/integration/concrete/flash-loan/flash-fee/flashFee.tree @@ -1,5 +1,5 @@ flashFee.t.sol -├── when the asset is not flash loanable +├── given the asset is not flash loanable │ └── it should revert -└── when the asset is flash loanable +└── given the asset is flash loanable └── it should return the correct flash fee diff --git a/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol b/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol index a1155e5ef..6f67dcf6b 100644 --- a/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol +++ b/test/integration/concrete/flash-loan/flash-loan/flashLoan.t.sol @@ -26,7 +26,7 @@ contract FlashLoanFunction_Integration_Concrete_Test is FlashLoanFunction_Integr flashLoan.flashLoan({ receiver: goodFlashLoanReceiver, asset: address(dai), amount: amount, data: bytes("") }); } - function test_RevertWhen_AssetNotFlashLoanable() external whenNotDelegateCalled whenAmountNotTooHigh { + function test_RevertGiven_AssetNotFlashLoanable() external whenNotDelegateCalled whenAmountNotTooHigh { vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2FlashLoan_AssetNotFlashLoanable.selector, dai)); flashLoan.flashLoan({ receiver: goodFlashLoanReceiver, asset: address(dai), amount: 0, data: bytes("") }); } @@ -35,7 +35,7 @@ contract FlashLoanFunction_Integration_Concrete_Test is FlashLoanFunction_Integr external whenNotDelegateCalled whenAmountNotTooHigh - whenAssetFlashLoanable + givenAssetFlashLoanable { // Set the comptroller flash fee so that the calculated fee ends up being greater than 2^128. comptroller.setFlashFee({ newFlashFee: ud(1.1e18) }); @@ -54,7 +54,7 @@ contract FlashLoanFunction_Integration_Concrete_Test is FlashLoanFunction_Integr external whenNotDelegateCalled whenAmountNotTooHigh - whenAssetFlashLoanable + givenAssetFlashLoanable whenCalculatedFeeNotTooHigh { deal({ token: address(dai), to: address(flashLoan), give: LIQUIDITY_AMOUNT }); @@ -71,7 +71,7 @@ contract FlashLoanFunction_Integration_Concrete_Test is FlashLoanFunction_Integr external whenNotDelegateCalled whenAmountNotTooHigh - whenAssetFlashLoanable + givenAssetFlashLoanable whenCalculatedFeeNotTooHigh whenBorrowDoesNotFail { @@ -90,7 +90,7 @@ contract FlashLoanFunction_Integration_Concrete_Test is FlashLoanFunction_Integr external whenNotDelegateCalled whenAmountNotTooHigh - whenAssetFlashLoanable + givenAssetFlashLoanable whenCalculatedFeeNotTooHigh whenBorrowDoesNotFail whenNoReentrancy diff --git a/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree b/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree index b26d24be1..f2af3ec8b 100644 --- a/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree +++ b/test/integration/concrete/flash-loan/flash-loan/flashLoan.tree @@ -5,9 +5,9 @@ flashLoan.t.sol ├── when the flash loan amount is too high │ └── it should revert └── when the flash loan amount is not too high - ├── when the asset is not flash loanable + ├── given the asset is not flash loanable │ └── it should revert - └── when the asset is flash loanable + └── given the asset is flash loanable ├── when the calculated fee is too high │ └── it should revert └── when the calculated fee is not too high @@ -21,6 +21,6 @@ flashLoan.t.sol │ └── it should revert └── when there is no reentrancy ├── it should execute the flash loan - ├── it should make the ERC-20 transfers + ├── it should make the ERC-20 transfers ├── it should update the protocol revenues └── it should emit a {FlashLoan} event diff --git a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol b/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol index d4a6d6309..2f52a376c 100644 --- a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol +++ b/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.t.sol @@ -10,12 +10,12 @@ contract MaxFlashLoan_Integration_Concrete_Test is FlashLoan_Integration_Shared_ assertEq(actualAmount, expectedAmount, "maxFlashLoan amount"); } - modifier whenAssetFlashLoanable() { + modifier givenAssetFlashLoanable() { comptroller.toggleFlashAsset(dai); _; } - function test_MaxFlashLoan() external whenAssetFlashLoanable { + function test_MaxFlashLoan() external givenAssetFlashLoanable { uint256 dealAmount = 14_607_904e18; deal({ token: address(dai), to: address(flashLoan), give: dealAmount }); uint256 actualAmount = flashLoan.maxFlashLoan(address(dai)); diff --git a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree b/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree index 5afc654f0..7eedfcdd9 100644 --- a/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree +++ b/test/integration/concrete/flash-loan/max-flash-loan/maxFlashLoan.tree @@ -1,5 +1,5 @@ maxFlashLoan.t.sol -├── when the asset is not flash loanable +├── given the asset is not flash loanable │ └── it should revert -└── when the asset is flash loanable +└── given the asset is flash loanable └── it should return the correct max flash loan diff --git a/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.t.sol b/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.t.sol index 6ce4607e9..7f3c7693c 100644 --- a/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.t.sol +++ b/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.t.sol @@ -168,7 +168,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Concrete_Test is createDefaultStreamWithSegments(segments); } - function test_RevertWhen_EndTimeNotInTheFuture() + function test_RevertGiven_EndTimeNotInTheFuture() external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -225,7 +225,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Concrete_Test is lockupDynamic.createWithMilestones(params); } - function test_RevertWhen_ProtocolFeeTooHigh() + function test_RevertGiven_ProtocolFeeTooHigh() external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -264,7 +264,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Concrete_Test is whenSegmentMilestonesOrdered whenEndTimeInTheFuture whenDepositAmountEqualToSegmentAmountsSum - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh { UD60x18 brokerFee = MAX_FEE + ud(1); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_BrokerFeeTooHigh.selector, brokerFee, MAX_FEE)); @@ -283,7 +283,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Concrete_Test is whenSegmentMilestonesOrdered whenEndTimeInTheFuture whenDepositAmountEqualToSegmentAmountsSum - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh { address nonContract = address(8128); @@ -311,7 +311,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Concrete_Test is whenSegmentMilestonesOrdered whenEndTimeInTheFuture whenDepositAmountEqualToSegmentAmountsSum - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh whenAssetContract { @@ -330,7 +330,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Concrete_Test is whenSegmentMilestonesOrdered whenEndTimeInTheFuture whenDepositAmountEqualToSegmentAmountsSum - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh whenAssetContract whenAssetERC20 diff --git a/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.tree b/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.tree index f52d89feb..3f40483aa 100644 --- a/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.tree +++ b/test/integration/concrete/lockup-dynamic/create-with-milestones/createWithMilestones.tree @@ -31,14 +31,12 @@ createWithMilestones.t.sol ├── when the deposit amount is not equal to the segment amounts sum │ └── it should revert └── when the deposit amount is equal to the segment amounts sum - ├── when the protocol fee is too high + ├── given the protocol fee is too high │ └── it should revert - └── when the protocol fee is not too high + └── given the protocol fee is not too high ├── when the broker fee is too high │ └── it should revert └── when the broker fee is not too high - ├── when the asset is not a contract - │ └── it should revert ├── when the asset is not a contract │ └── it should revert └── when the asset is a contract diff --git a/test/integration/concrete/lockup-dynamic/get-range/getRange.t.sol b/test/integration/concrete/lockup-dynamic/get-range/getRange.t.sol index e8a1e80df..892864707 100644 --- a/test/integration/concrete/lockup-dynamic/get-range/getRange.t.sol +++ b/test/integration/concrete/lockup-dynamic/get-range/getRange.t.sol @@ -7,17 +7,17 @@ import { LockupDynamic } from "src/types/DataTypes.sol"; import { LockupDynamic_Integration_Concrete_Test } from "../LockupDynamic.t.sol"; contract GetRange_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Integration_Concrete_Test { - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockupDynamic.getRange(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetRange() external whenNotNull { + function test_GetRange() external givenNotNull { uint256 streamId = createDefaultStream(); LockupDynamic.Range memory actualRange = lockupDynamic.getRange(streamId); LockupDynamic.Range memory expectedRange = defaults.lockupDynamicRange(); diff --git a/test/integration/concrete/lockup-dynamic/get-range/getRange.tree b/test/integration/concrete/lockup-dynamic/get-range/getRange.tree index 65bac33fc..88dcc9707 100644 --- a/test/integration/concrete/lockup-dynamic/get-range/getRange.tree +++ b/test/integration/concrete/lockup-dynamic/get-range/getRange.tree @@ -1,5 +1,5 @@ getRange.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct range diff --git a/test/integration/concrete/lockup-dynamic/get-segments/getSegments.t.sol b/test/integration/concrete/lockup-dynamic/get-segments/getSegments.t.sol index 7b1ab1c3e..f46eee599 100644 --- a/test/integration/concrete/lockup-dynamic/get-segments/getSegments.t.sol +++ b/test/integration/concrete/lockup-dynamic/get-segments/getSegments.t.sol @@ -7,17 +7,17 @@ import { LockupDynamic } from "src/types/DataTypes.sol"; import { LockupDynamic_Integration_Concrete_Test } from "../LockupDynamic.t.sol"; contract GetSegments_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Integration_Concrete_Test { - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockupDynamic.getSegments(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetSegments() external whenNotNull { + function test_GetSegments() external givenNotNull { uint256 streamId = createDefaultStream(); LockupDynamic.Segment[] memory actualSegments = lockupDynamic.getSegments(streamId); LockupDynamic.Segment[] memory expectedSegments = defaults.segments(); diff --git a/test/integration/concrete/lockup-dynamic/get-segments/getSegments.tree b/test/integration/concrete/lockup-dynamic/get-segments/getSegments.tree index cf385a17e..b7032eba6 100644 --- a/test/integration/concrete/lockup-dynamic/get-segments/getSegments.tree +++ b/test/integration/concrete/lockup-dynamic/get-segments/getSegments.tree @@ -1,5 +1,5 @@ getSegments.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct segments diff --git a/test/integration/concrete/lockup-dynamic/get-stream/getStream.t.sol b/test/integration/concrete/lockup-dynamic/get-stream/getStream.t.sol index 02995bb88..5c01e7898 100644 --- a/test/integration/concrete/lockup-dynamic/get-stream/getStream.t.sol +++ b/test/integration/concrete/lockup-dynamic/get-stream/getStream.t.sol @@ -14,17 +14,17 @@ contract GetStream_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Inte defaultStreamId = createDefaultStream(); } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockupDynamic.getStream(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetStream_StatusSettled() external whenNotNull { + function test_GetStream_StatusSettled() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); LockupDynamic.Stream memory actualStream = lockupDynamic.getStream(defaultStreamId); LockupDynamic.Stream memory expectedStream = defaults.lockupDynamicStream(); @@ -32,11 +32,11 @@ contract GetStream_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Inte assertEq(actualStream, expectedStream); } - modifier whenStatusNotSettled() { + modifier givenStatusNotSettled() { _; } - function test_GetStream() external whenNotNull whenStatusNotSettled { + function test_GetStream() external givenNotNull givenStatusNotSettled { uint256 streamId = createDefaultStream(); LockupDynamic.Stream memory actualStream = lockupDynamic.getStream(streamId); LockupDynamic.Stream memory expectedStream = defaults.lockupDynamicStream(); diff --git a/test/integration/concrete/lockup-dynamic/get-stream/getStream.tree b/test/integration/concrete/lockup-dynamic/get-stream/getStream.tree index 2d7fb821c..c3278db89 100644 --- a/test/integration/concrete/lockup-dynamic/get-stream/getStream.tree +++ b/test/integration/concrete/lockup-dynamic/get-stream/getStream.tree @@ -1,8 +1,8 @@ getStream.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream is settled +└── given the id does not reference a null stream + ├── given the stream is settled │ └── it should adjust the `isCancelable` flag and return the stream - └── when the id does not reference a null stream + └── given the stream is not settled └── it should return the stream diff --git a/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.t.sol b/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.t.sol index e5a2f8d14..1910b10da 100644 --- a/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.t.sol +++ b/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.t.sol @@ -21,9 +21,9 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is function test_StreamedAmountOf_StartTimeInTheFuture() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { vm.warp({ timestamp: 0 }); uint128 actualStreamedAmount = lockupDynamic.streamedAmountOf(defaultStreamId); @@ -33,9 +33,9 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is function test_StreamedAmountOf_StartTimeInThePresent() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { vm.warp({ timestamp: defaults.START_TIME() }); uint128 actualStreamedAmount = lockupDynamic.streamedAmountOf(defaultStreamId); @@ -45,9 +45,9 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is function test_StreamedAmountOf_OneSegment() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming whenStartTimeInThePast { // Simulate the passage of time. @@ -70,16 +70,16 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount"); } - modifier whenMultipleSegments() { + modifier givenMultipleSegments() { _; } function test_StreamedAmountOf_CurrentMilestone1st() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming - whenMultipleSegments + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming + givenMultipleSegments whenStartTimeInThePast { // Warp 1 second to the future. @@ -97,11 +97,11 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is function test_StreamedAmountOf_CurrentMilestoneNot1st() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming whenStartTimeInThePast - whenMultipleSegments + givenMultipleSegments whenCurrentMilestoneNot1st { // Simulate the passage of time. 750 seconds is ~10% of the way in the second segment. diff --git a/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.tree b/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.tree index 49d2ff8b3..275d4f39c 100644 --- a/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.tree +++ b/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.tree @@ -1,13 +1,13 @@ streamedAmountOf.t.sol -└── when the stream's status is "STREAMING" +└── given the stream's status is "STREAMING" ├── when the start time is in the future │ └── it should return zero ├── when the start time is in the present │ └── it should return zero └── when the start time is in the past - ├── when there is one segment + ├── given there is one segment │ └── it should return the correct streamed amount - └── when there are multiple segments + └── given there are multiple segments ├── when the current milestone is the 1st in the array │ └── it should return the correct streamed amount └── when the current milestone is not the 1st in the array diff --git a/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.t.sol b/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.t.sol index 22780fae5..c3e203e9b 100644 --- a/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.t.sol +++ b/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.t.sol @@ -31,13 +31,13 @@ contract TokenURI_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Integ } } - function test_RevertWhen_NFTDoesNotExist() external { + function test_RevertGiven_NFTDoesNotExist() external { uint256 nullStreamId = 1729; vm.expectRevert("ERC721: invalid token ID"); lockupDynamic.tokenURI({ tokenId: nullStreamId }); } - modifier whenNFTExists() { + modifier givenNFTExists() { defaultStreamId = createDefaultStream(); vm.warp({ timestamp: defaults.START_TIME() + defaults.TOTAL_DURATION() / 4 }); _; @@ -46,7 +46,7 @@ contract TokenURI_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Integ /// @dev If you need to update the hard-coded token URI: /// 1. Use "vm.writeFile" to log the strings to a file. /// 2. Remember to escape the EOL character \n with \\n. - function test_TokenURI_Decoded() external skipOnMismatch whenNFTExists { + function test_TokenURI_Decoded() external skipOnMismatch givenNFTExists { string memory tokenURI = lockupDynamic.tokenURI(defaultStreamId); tokenURI = tokenURI.replace({ search: "data:application/json;base64,", replacement: "" }); string memory actualDecodedTokenURI = string(Base64.decode(tokenURI)); @@ -55,7 +55,7 @@ contract TokenURI_LockupDynamic_Integration_Concrete_Test is LockupDynamic_Integ assertEq(actualDecodedTokenURI, expectedDecodedTokenURI, "decoded token URI"); } - function test_TokenURI_Full() external skipOnMismatch whenNFTExists { + function test_TokenURI_Full() external skipOnMismatch givenNFTExists { string memory actualTokenURI = lockupDynamic.tokenURI(defaultStreamId); string memory expectedTokenURI = "data:application/json;base64,eyJhdHRyaWJ1dGVzIjpbeyJ0cmFpdF90eXBlIjoiQXNzZXQiLCJ2YWx1ZSI6IkRBSSJ9LHsidHJhaXRfdHlwZSI6IlNlbmRlciIsInZhbHVlIjoiMHg2MzMyZTdiMWRlYjFmMWEwYjc3YjJiYjE4YjE0NDMzMGM3MjkxYmNhIn0seyJ0cmFpdF90eXBlIjoiU3RhdHVzIiwidmFsdWUiOiJTdHJlYW1pbmcifV0sImRlc2NyaXB0aW9uIjoiVGhpcyBORlQgcmVwcmVzZW50cyBhIHBheW1lbnQgc3RyZWFtIGluIGEgU2FibGllciBWMiBMb2NrdXAgRHluYW1pYyBjb250cmFjdC4gVGhlIG93bmVyIG9mIHRoaXMgTkZUIGNhbiB3aXRoZHJhdyB0aGUgc3RyZWFtZWQgYXNzZXRzLCB3aGljaCBhcmUgZGVub21pbmF0ZWQgaW4gREFJLlxuXG4tIFN0cmVhbSBJRDogMVxuLSBMb2NrdXAgRHluYW1pYyBBZGRyZXNzOiAweGRiMjVhN2I3NjgzMTFkZTEyOGJiZGE3Yjg0MjZjM2Y5Yzc0ZjMyNDBcbi0gREFJIEFkZHJlc3M6IDB4MDNhNmE4NGNkNzYyZDk3MDdhMjE2MDViNTQ4YWFhYjg5MTU2MmFhYlxuXG7imqDvuI8gV0FSTklORzogVHJhbnNmZXJyaW5nIHRoZSBORlQgbWFrZXMgdGhlIG5ldyBvd25lciB0aGUgcmVjaXBpZW50IG9mIHRoZSBzdHJlYW0uIFRoZSBmdW5kcyBhcmUgbm90IGF1dG9tYXRpY2FsbHkgd2l0aGRyYXduIGZ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ZzRvQ2lJRVJCU1R3dmRHVjRkRkJoZEdnK1BDOTBaWGgwUGp4MWMyVWdhSEpsWmowaUkwZHNiM2NpSUdacGJHd3RiM0JoWTJsMGVUMGlMamtpTHo0OGRYTmxJR2h5WldZOUlpTkhiRzkzSWlCNFBTSXhNREF3SWlCNVBTSXhNREF3SWlCbWFXeHNMVzl3WVdOcGRIazlJaTQ1SWk4K1BIVnpaU0JvY21WbVBTSWpURzluYnlJZ2VEMGlNVGN3SWlCNVBTSXhOekFpSUhSeVlXNXpabTl5YlQwaWMyTmhiR1VvTGpZcElpOCtQSFZ6WlNCb2NtVm1QU0lqU0c5MWNtZHNZWE56SWlCNFBTSXhOVEFpSUhrOUlqa3dJaUIwY21GdWMyWnZjbTA5SW5KdmRHRjBaU2d4TUNraUlIUnlZVzV6Wm05eWJTMXZjbWxuYVc0OUlqVXdNQ0ExTURBaUx6NDhkWE5sSUdoeVpXWTlJaU5RY205bmNtVnpjeUlnZUQwaU1USTRJaUI1UFNJM09UQWlMejQ4ZFhObElHaHlaV1k5SWlOVGRHRjBkWE1pSUhnOUlqTTFNaUlnZVQwaU56a3dJaTgrUEhWelpTQm9jbVZtUFNJalUzUnlaV0Z0WldRaUlIZzlJalUxTWlJZ2VUMGlOemt3SWk4K1BIVnpaU0JvY21WbVBTSWpSSFZ5WVhScGIyNGlJSGc5SWpjeU1DSWdlVDBpTnprd0lpOCtQQzl6ZG1jKyJ9"; diff --git a/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.tree b/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.tree index 40f24ec39..6a58d7e09 100644 --- a/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.tree +++ b/test/integration/concrete/lockup-dynamic/token-uri/tokenURI.tree @@ -1,5 +1,5 @@ tokenURI.t.sol -├── when the NFT does not exist +├── given the NFT does not exist │ └── it should revert -└── when the NFT exists +└── given the NFT exists └── it should return the correct token URI diff --git a/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.t.sol b/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.t.sol index 33352c0ae..9bd621cd6 100644 --- a/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.t.sol +++ b/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.t.sol @@ -20,9 +20,9 @@ contract WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test is function test_WithdrawableAmountOf_StartTimeInThePresent() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { vm.warp({ timestamp: defaults.START_TIME() }); uint128 actualWithdrawableAmount = lockupDynamic.withdrawableAmountOf(defaultStreamId); @@ -36,9 +36,9 @@ contract WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test is function test_WithdrawableAmountOf_NoPreviousWithdrawals() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming whenStartTimeInThePast { // Simulate the passage of time. @@ -57,9 +57,9 @@ contract WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test is function test_WithdrawableAmountOf() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming whenStartTimeInThePast whenWithWithdrawals { diff --git a/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.tree b/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.tree index db107476b..ae1801f3a 100644 --- a/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.tree +++ b/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.tree @@ -1,9 +1,9 @@ withdrawableAmountOf.t.sol -└── when the stream's status is "STREAMING" +└── given the stream's status is "STREAMING" ├── when the start time is in the present │ └── it should return zero └── when the start time is in the past - ├── when there are no previous withdrawals + ├── given there are no previous withdrawals │ └── it should return the correct withdrawable amount - └── when there are previous withdrawals + └── given there are previous withdrawals └── it should return the correct withdrawable amount diff --git a/test/integration/concrete/lockup-linear/create-with-range/createWithRange.t.sol b/test/integration/concrete/lockup-linear/create-with-range/createWithRange.t.sol index d4a87d8bc..33d7ae280 100644 --- a/test/integration/concrete/lockup-linear/create-with-range/createWithRange.t.sol +++ b/test/integration/concrete/lockup-linear/create-with-range/createWithRange.t.sol @@ -77,7 +77,7 @@ contract CreateWithRange_LockupLinear_Integration_Concrete_Test is createDefaultStreamWithRange(LockupLinear.Range({ start: startTime, cliff: cliffTime, end: endTime })); } - function test_RevertWhen_EndTimeNotInTheFuture() + function test_RevertGiven_EndTimeNotInTheFuture() external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -92,7 +92,7 @@ contract CreateWithRange_LockupLinear_Integration_Concrete_Test is createDefaultStream(); } - function test_RevertWhen_ProtocolFeeTooHigh() + function test_RevertGiven_ProtocolFeeTooHigh() external whenNotDelegateCalled whenRecipientNonZeroAddress @@ -123,7 +123,7 @@ contract CreateWithRange_LockupLinear_Integration_Concrete_Test is whenStartTimeNotGreaterThanCliffTime whenCliffTimeLessThanEndTime whenEndTimeInTheFuture - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh { UD60x18 brokerFee = MAX_FEE + ud(1); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_BrokerFeeTooHigh.selector, brokerFee, MAX_FEE)); @@ -138,7 +138,7 @@ contract CreateWithRange_LockupLinear_Integration_Concrete_Test is whenStartTimeNotGreaterThanCliffTime whenCliffTimeLessThanEndTime whenEndTimeInTheFuture - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh { address nonContract = address(8128); @@ -154,7 +154,7 @@ contract CreateWithRange_LockupLinear_Integration_Concrete_Test is whenStartTimeNotGreaterThanCliffTime whenCliffTimeLessThanEndTime whenEndTimeInTheFuture - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh whenAssetContract { @@ -168,7 +168,7 @@ contract CreateWithRange_LockupLinear_Integration_Concrete_Test is whenStartTimeNotGreaterThanCliffTime whenCliffTimeLessThanEndTime whenEndTimeInTheFuture - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh whenAssetContract whenAssetERC20 diff --git a/test/integration/concrete/lockup-linear/create-with-range/createWithRange.tree b/test/integration/concrete/lockup-linear/create-with-range/createWithRange.tree index cdc32106d..16b1ba5da 100644 --- a/test/integration/concrete/lockup-linear/create-with-range/createWithRange.tree +++ b/test/integration/concrete/lockup-linear/create-with-range/createWithRange.tree @@ -17,9 +17,9 @@ createWithRange.t.sol ├── when the end time is not in the future │ └── it should revert └── when the end time is in the future - ├── when the protocol fee is too high + ├── given the protocol fee is too high │ └── it should revert - └── when the protocol fee is not too high + └── given the protocol fee is not too high ├── when the broker fee is too high │ └── it should revert └── when the broker fee is not too high diff --git a/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.t.sol b/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.t.sol index bbc54e23a..2a22e894b 100644 --- a/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.t.sol +++ b/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.t.sol @@ -6,17 +6,17 @@ import { Errors } from "src/libraries/Errors.sol"; import { LockupLinear_Integration_Concrete_Test } from "../LockupLinear.t.sol"; contract GetCliffTime_LockupLinear_Integration_Concrete_Test is LockupLinear_Integration_Concrete_Test { - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockupLinear.getCliffTime(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetCliffTime() external whenNotNull { + function test_GetCliffTime() external givenNotNull { uint256 streamId = createDefaultStream(); uint40 actualCliffTime = lockupLinear.getCliffTime(streamId); uint40 expectedCliffTime = defaults.CLIFF_TIME(); diff --git a/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.tree b/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.tree index 766c02712..afa854032 100644 --- a/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.tree +++ b/test/integration/concrete/lockup-linear/get-cliff-time/getCliffTime.tree @@ -1,5 +1,5 @@ getCliffTime.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct cliff time diff --git a/test/integration/concrete/lockup-linear/get-range/getRange.t.sol b/test/integration/concrete/lockup-linear/get-range/getRange.t.sol index 77bbb453f..de45282ca 100644 --- a/test/integration/concrete/lockup-linear/get-range/getRange.t.sol +++ b/test/integration/concrete/lockup-linear/get-range/getRange.t.sol @@ -7,17 +7,17 @@ import { LockupLinear } from "src/types/DataTypes.sol"; import { LockupLinear_Integration_Concrete_Test } from "../LockupLinear.t.sol"; contract GetRange_LockupLinear_Integration_Concrete_Test is LockupLinear_Integration_Concrete_Test { - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockupLinear.getRange(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetRange() external whenNotNull { + function test_GetRange() external givenNotNull { uint256 streamId = createDefaultStream(); LockupLinear.Range memory actualRange = lockupLinear.getRange(streamId); LockupLinear.Range memory expectedRange = defaults.lockupLinearRange(); diff --git a/test/integration/concrete/lockup-linear/get-range/getRange.tree b/test/integration/concrete/lockup-linear/get-range/getRange.tree index 65bac33fc..88dcc9707 100644 --- a/test/integration/concrete/lockup-linear/get-range/getRange.tree +++ b/test/integration/concrete/lockup-linear/get-range/getRange.tree @@ -1,5 +1,5 @@ getRange.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct range diff --git a/test/integration/concrete/lockup-linear/get-stream/getStream.t.sol b/test/integration/concrete/lockup-linear/get-stream/getStream.t.sol index 1b70b8118..d182bbf03 100644 --- a/test/integration/concrete/lockup-linear/get-stream/getStream.t.sol +++ b/test/integration/concrete/lockup-linear/get-stream/getStream.t.sol @@ -14,17 +14,17 @@ contract GetStream_LockupLinear_Integration_Concrete_Test is LockupLinear_Integr defaultStreamId = createDefaultStream(); } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockupLinear.getStream(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetStream_StatusSettled() external whenNotNull { + function test_GetStream_StatusSettled() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); LockupLinear.Stream memory actualStream = lockupLinear.getStream(defaultStreamId); LockupLinear.Stream memory expectedStream = defaults.lockupLinearStream(); @@ -32,11 +32,11 @@ contract GetStream_LockupLinear_Integration_Concrete_Test is LockupLinear_Integr assertEq(actualStream, expectedStream); } - modifier whenStatusNotSettled() { + modifier givenStatusNotSettled() { _; } - function test_GetStream() external whenNotNull whenStatusNotSettled { + function test_GetStream() external givenNotNull givenStatusNotSettled { LockupLinear.Stream memory actualStream = lockupLinear.getStream(defaultStreamId); LockupLinear.Stream memory expectedStream = defaults.lockupLinearStream(); assertEq(actualStream, expectedStream); diff --git a/test/integration/concrete/lockup-linear/get-stream/getStream.tree b/test/integration/concrete/lockup-linear/get-stream/getStream.tree index 2d7fb821c..c3278db89 100644 --- a/test/integration/concrete/lockup-linear/get-stream/getStream.tree +++ b/test/integration/concrete/lockup-linear/get-stream/getStream.tree @@ -1,8 +1,8 @@ getStream.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream is settled +└── given the id does not reference a null stream + ├── given the stream is settled │ └── it should adjust the `isCancelable` flag and return the stream - └── when the id does not reference a null stream + └── given the stream is not settled └── it should return the stream diff --git a/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.t.sol b/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.t.sol index baff6db82..4320a4aac 100644 --- a/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.t.sol +++ b/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.t.sol @@ -19,9 +19,9 @@ contract StreamedAmountOf_LockupLinear_Integration_Concrete_Test is function test_StreamedAmountOf_CliffTimeInThePast() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { uint128 actualStreamedAmount = lockupLinear.streamedAmountOf(defaultStreamId); uint128 expectedStreamedAmount = 0; @@ -30,9 +30,9 @@ contract StreamedAmountOf_LockupLinear_Integration_Concrete_Test is function test_StreamedAmountOf_CliffTimeInThePresent() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { vm.warp({ timestamp: defaults.CLIFF_TIME() }); uint128 actualStreamedAmount = lockupLinear.streamedAmountOf(defaultStreamId); @@ -42,9 +42,9 @@ contract StreamedAmountOf_LockupLinear_Integration_Concrete_Test is function test_StreamedAmountOf_CliffTimeInTheFuture() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); uint128 actualStreamedAmount = lockupLinear.streamedAmountOf(defaultStreamId); diff --git a/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.tree b/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.tree index ee7d4db32..8b2d3639f 100644 --- a/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.tree +++ b/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.tree @@ -1,5 +1,5 @@ streamedAmountOf.t.sol -└── when the stream's status is "STREAMING" +└── given the stream's status is "STREAMING" ├── when the cliff time is in the past │ └── it should return zero ├── when the cliff time is in the present diff --git a/test/integration/concrete/lockup-linear/token-uri/tokenURI.t.sol b/test/integration/concrete/lockup-linear/token-uri/tokenURI.t.sol index 0eb91dd3f..2f628b15f 100644 --- a/test/integration/concrete/lockup-linear/token-uri/tokenURI.t.sol +++ b/test/integration/concrete/lockup-linear/token-uri/tokenURI.t.sol @@ -31,13 +31,13 @@ contract TokenURI_LockupLinear_Integration_Concrete_Test is LockupLinear_Integra } } - function test_RevertWhen_NFTDoesNotExist() external { + function test_RevertGiven_NFTDoesNotExist() external { uint256 nullStreamId = 1729; vm.expectRevert("ERC721: invalid token ID"); lockupLinear.tokenURI({ tokenId: nullStreamId }); } - modifier whenNFTExists() { + modifier givenNFTExists() { defaultStreamId = createDefaultStream(); vm.warp({ timestamp: defaults.START_TIME() + defaults.TOTAL_DURATION() / 4 }); _; @@ -46,7 +46,7 @@ contract TokenURI_LockupLinear_Integration_Concrete_Test is LockupLinear_Integra /// @dev If you need to update the hard-coded token URI: /// 1. Use "vm.writeFile" to log the strings to a file. /// 2. Remember to escape the EOL character \n with \\n. - function test_TokenURI_Decoded() external skipOnMismatch whenNFTExists { + function test_TokenURI_Decoded() external skipOnMismatch givenNFTExists { string memory tokenURI = lockupLinear.tokenURI(defaultStreamId); tokenURI = tokenURI.replace({ search: "data:application/json;base64,", replacement: "" }); string memory actualDecodedTokenURI = string(Base64.decode(tokenURI)); @@ -55,7 +55,7 @@ contract TokenURI_LockupLinear_Integration_Concrete_Test is LockupLinear_Integra assertEq(actualDecodedTokenURI, expectedDecodedTokenURI, "decoded token URI"); } - function test_TokenURI_Full() external skipOnMismatch whenNFTExists { + function test_TokenURI_Full() external skipOnMismatch givenNFTExists { string memory actualTokenURI = lockupLinear.tokenURI(defaultStreamId); string memory expectedTokenURI =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Gp4MWMyVWdhSEpsWmowaUkweHZaMjhpSUhnOUlqRTNNQ0lnZVQwaU1UY3dJaUIwY21GdWMyWnZjbTA5SW5OallXeGxLQzQyS1NJdlBqeDFjMlVnYUhKbFpqMGlJMGh2ZFhKbmJHRnpjeUlnZUQwaU1UVXdJaUI1UFNJNU1DSWdkSEpoYm5ObWIzSnRQU0p5YjNSaGRHVW9NVEFwSWlCMGNtRnVjMlp2Y20wdGIzSnBaMmx1UFNJMU1EQWdOVEF3SWk4K1BIVnpaU0JvY21WbVBTSWpVSEp2WjNKbGMzTWlJSGc5SWpFeU9DSWdlVDBpTnprd0lpOCtQSFZ6WlNCb2NtVm1QU0lqVTNSaGRIVnpJaUI0UFNJek5USWlJSGs5SWpjNU1DSXZQangxYzJVZ2FISmxaajBpSTFOMGNtVmhiV1ZrSWlCNFBTSTFOVElpSUhrOUlqYzVNQ0l2UGp4MWMyVWdhSEpsWmowaUkwUjFjbUYwYVc5dUlpQjRQU0kzTWpBaUlIazlJamM1TUNJdlBqd3ZjM1puUGc9PSJ9"; diff --git a/test/integration/concrete/lockup-linear/token-uri/tokenURI.tree b/test/integration/concrete/lockup-linear/token-uri/tokenURI.tree index 40f24ec39..6a58d7e09 100644 --- a/test/integration/concrete/lockup-linear/token-uri/tokenURI.tree +++ b/test/integration/concrete/lockup-linear/token-uri/tokenURI.tree @@ -1,5 +1,5 @@ tokenURI.t.sol -├── when the NFT does not exist +├── given the NFT does not exist │ └── it should revert -└── when the NFT exists +└── given the NFT exists └── it should return the correct token URI diff --git a/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.t.sol b/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.t.sol index 76e90e2cd..176ad7b35 100644 --- a/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.t.sol +++ b/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.t.sol @@ -20,9 +20,9 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test is function test_WithdrawableAmountOf_CliffTimeInTheFuture() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming { uint128 actualWithdrawableAmount = lockupLinear.withdrawableAmountOf(defaultStreamId); uint128 expectedWithdrawableAmount = 0; @@ -36,9 +36,9 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test is function test_WithdrawableAmountOf_NoPreviousWithdrawals() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming whenCliffTimeNotInTheFuture { uint128 actualWithdrawableAmount = lockupLinear.withdrawableAmountOf(defaultStreamId); @@ -46,18 +46,18 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test is assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - modifier whenPreviousWithdrawals() { + modifier givenPreviousWithdrawals() { lockupLinear.withdraw({ streamId: defaultStreamId, to: users.recipient, amount: defaults.WITHDRAW_AMOUNT() }); _; } function test_WithdrawableAmountOf_WithWithdrawals() external - whenNotNull - whenStreamHasNotBeenCanceled - whenStatusStreaming + givenNotNull + givenStreamHasNotBeenCanceled + givenStatusStreaming whenCliffTimeNotInTheFuture - whenPreviousWithdrawals + givenPreviousWithdrawals { uint128 actualWithdrawableAmount = lockupLinear.withdrawableAmountOf(defaultStreamId); uint128 expectedWithdrawableAmount = 0; diff --git a/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.tree b/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.tree index 90506a4c9..6ad39a5f9 100644 --- a/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.tree +++ b/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.tree @@ -1,9 +1,9 @@ withdrawableAmountOf.t.sol -└── when the stream's status is "STREAMING" +└── given the stream's status is "STREAMING" ├── when the cliff time is in the future │ └── it should return zero └── when the cliff time is not in the future - ├── when there are no previous withdrawals + ├── given there are no previous withdrawals │ └── it should return the correct withdrawable amount - └── when there are previous withdrawals + └── given there are previous withdrawals └── it should return the correct withdrawable amount diff --git a/test/integration/concrete/lockup/burn/burn.t.sol b/test/integration/concrete/lockup/burn/burn.t.sol index c4a18de5f..dfd4aa35c 100644 --- a/test/integration/concrete/lockup/burn/burn.t.sol +++ b/test/integration/concrete/lockup/burn/burn.t.sol @@ -27,58 +27,58 @@ abstract contract Burn_Integration_Concrete_Test is Integration_Test, Lockup_Int _; } - function test_RevertWhen_Null() external whenNotDelegateCalled { + function test_RevertGiven_Null() external whenNotDelegateCalled { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.burn(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - modifier whenStreamHasNotBeenDepleted() { + modifier givenStreamHasNotBeenDepleted() { _; } - function test_RevertWhen_StreamHasNotBeenDepleted_StatusPending() + function test_RevertGiven_StatusPending() external whenNotDelegateCalled - whenNotNull - whenStreamHasNotBeenDepleted + givenNotNull + givenStreamHasNotBeenDepleted { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamNotDepleted.selector, streamId)); lockup.burn(streamId); } - function test_RevertWhen_StreamHasNotBeenDepleted_StatusStreaming() + function test_RevertGiven_StatusStreaming() external whenNotDelegateCalled - whenNotNull - whenStreamHasNotBeenDepleted + givenNotNull + givenStreamHasNotBeenDepleted { vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamNotDepleted.selector, streamId)); lockup.burn(streamId); } - function test_RevertWhen_StreamHasNotBeenDepleted_StatusSettled() + function test_RevertGiven_StatusSettled() external whenNotDelegateCalled - whenNotNull - whenStreamHasNotBeenDepleted + givenNotNull + givenStreamHasNotBeenDepleted { vm.warp({ timestamp: defaults.END_TIME() }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamNotDepleted.selector, streamId)); lockup.burn(streamId); } - function test_RevertWhen_StreamHasNotBeenDepleted_StatusCanceled() + function test_RevertGiven_StatusCanceled() external whenNotDelegateCalled - whenNotNull - whenStreamHasNotBeenDepleted + givenNotNull + givenStreamHasNotBeenDepleted { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(streamId); @@ -86,7 +86,7 @@ abstract contract Burn_Integration_Concrete_Test is Integration_Test, Lockup_Int lockup.burn(streamId); } - modifier whenStreamHasBeenDepleted() { + modifier givenStreamHasBeenDepleted() { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: streamId, to: users.recipient }); _; @@ -95,13 +95,10 @@ abstract contract Burn_Integration_Concrete_Test is Integration_Test, Lockup_Int function test_RevertWhen_CallerUnauthorized() external whenNotDelegateCalled - whenNotNull - whenStreamHasBeenDepleted + givenNotNull + givenStreamHasBeenDepleted { - // Make Eve the caller in the rest of this test. changePrank({ msgSender: users.eve }); - - // Run the test. vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Unauthorized.selector, streamId, users.eve)); lockup.burn(streamId); } @@ -110,11 +107,11 @@ abstract contract Burn_Integration_Concrete_Test is Integration_Test, Lockup_Int _; } - function test_RevertWhen_NFTDoesNotExist() + function test_RevertGiven_NFTDoesNotExist() external whenNotDelegateCalled - whenNotNull - whenStreamHasBeenDepleted + givenNotNull + givenStreamHasBeenDepleted whenCallerAuthorized { // Burn the NFT so that it no longer exists. @@ -125,17 +122,17 @@ abstract contract Burn_Integration_Concrete_Test is Integration_Test, Lockup_Int lockup.burn(streamId); } - modifier whenNFTExists() { + modifier givenNFTExists() { _; } function test_Burn_CallerApprovedOperator() external whenNotDelegateCalled - whenNotNull - whenStreamHasBeenDepleted + givenNotNull + givenStreamHasBeenDepleted whenCallerAuthorized - whenNFTExists + givenNFTExists { // Approve the operator to handle the stream. lockup.approve({ to: users.operator, tokenId: streamId }); @@ -154,10 +151,10 @@ abstract contract Burn_Integration_Concrete_Test is Integration_Test, Lockup_Int function test_Burn_CallerNFTOwner() external whenNotDelegateCalled - whenNotNull - whenStreamHasBeenDepleted + givenNotNull + givenStreamHasBeenDepleted whenCallerAuthorized - whenNFTExists + givenNFTExists { lockup.burn(streamId); vm.expectRevert("ERC721: invalid token ID"); diff --git a/test/integration/concrete/lockup/burn/burn.tree b/test/integration/concrete/lockup/burn/burn.tree index 0716bbe8a..cbf412d28 100644 --- a/test/integration/concrete/lockup/burn/burn.tree +++ b/test/integration/concrete/lockup/burn/burn.tree @@ -2,25 +2,25 @@ burn.t.sol ├── when delegate called │ └── it should revert └── when not delegate called - ├── when the id references a null stream + ├── given the id references a null stream │ └── it should revert - └── when the id does not reference a null stream - ├── when the stream has not been depleted - │ ├── when the stream's status is "PENDING" + └── given the id does not reference a null stream + ├── given the stream has not been depleted + │ ├── given the stream's status is "PENDING" │ │ └── it should revert - │ ├── when the stream's status is "STREAMING" + │ ├── given the stream's status is "STREAMING" │ │ └── it should revert - │ ├── when the stream's status is "SETTLED" + │ ├── given the stream's status is "SETTLED" │ │ └── it should revert - │ └── when the stream's status is "CANCELED" + │ └── given the stream's status is "CANCELED" │ └── it should revert - └── when the stream has been depleted + └── given the stream has been depleted ├── when the caller is unauthorized │ └── it should revert └── when the caller is authorized - ├── when NFT does not exist + ├── given the NFT does not exist │ └── it should revert - └── when NFT exists + └── given the NFT exists ├── when the caller is an approved third party │ └── it should burn the NFT └── when the caller is the owner of the NFT diff --git a/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.t.sol b/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.t.sol index 8b208c52c..67103ba5d 100644 --- a/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.t.sol +++ b/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.t.sol @@ -29,25 +29,25 @@ abstract contract CancelMultiple_Integration_Concrete_Test is lockup.cancelMultiple(streamIds); } - function test_RevertWhen_OnlyNull() external whenNotDelegateCalled whenArrayCountNotZero { + function test_RevertGiven_OnlyNull() external whenNotDelegateCalled whenArrayCountNotZero { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.cancelMultiple({ streamIds: Solarray.uint256s(nullStreamId) }); } - function test_RevertWhen_SomeNull() external whenNotDelegateCalled whenArrayCountNotZero { + function test_RevertGiven_SomeNull() external whenNotDelegateCalled whenArrayCountNotZero { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.cancelMultiple({ streamIds: Solarray.uint256s(testStreamIds[0], nullStreamId) }); } - function test_RevertWhen_AllStreamsCold() external whenNotDelegateCalled whenArrayCountNotZero whenNoNull { + function test_RevertGiven_AllStreamsCold() external whenNotDelegateCalled whenArrayCountNotZero givenNoNull { vm.warp({ timestamp: defaults.END_TIME() }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamSettled.selector, testStreamIds[0])); lockup.cancelMultiple({ streamIds: testStreamIds }); } - function test_RevertWhen_SomeStreamsCold() external whenNotDelegateCalled whenArrayCountNotZero whenNoNull { + function test_RevertGiven_SomeStreamsCold() external whenNotDelegateCalled whenArrayCountNotZero givenNoNull { uint256 earlyStreamId = createDefaultStreamWithEndTime({ endTime: defaults.CLIFF_TIME() + 1 seconds }); vm.warp({ timestamp: defaults.CLIFF_TIME() + 1 seconds }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamSettled.selector, earlyStreamId)); @@ -58,8 +58,8 @@ abstract contract CancelMultiple_Integration_Concrete_Test is external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerUnauthorized { // Make Eve the caller in this test. @@ -76,8 +76,8 @@ abstract contract CancelMultiple_Integration_Concrete_Test is external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerUnauthorized { // Approve the operator for all streams. @@ -98,8 +98,8 @@ abstract contract CancelMultiple_Integration_Concrete_Test is external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerUnauthorized { // Transfer the streams to Alice. @@ -118,8 +118,8 @@ abstract contract CancelMultiple_Integration_Concrete_Test is external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerUnauthorized { changePrank({ msgSender: users.eve }); @@ -139,8 +139,8 @@ abstract contract CancelMultiple_Integration_Concrete_Test is external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerUnauthorized { // Approve the operator to handle the first stream. @@ -161,8 +161,8 @@ abstract contract CancelMultiple_Integration_Concrete_Test is external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerUnauthorized { // Transfer the first stream to Eve. @@ -176,12 +176,12 @@ abstract contract CancelMultiple_Integration_Concrete_Test is lockup.cancelMultiple(testStreamIds); } - function test_RevertWhen_AllStreamsNotCancelable() + function test_RevertGiven_AllStreamsNotCancelable() external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerAuthorizedAllStreams { uint256 notCancelableStreamId = createDefaultStreamNotCancelable(); @@ -191,12 +191,12 @@ abstract contract CancelMultiple_Integration_Concrete_Test is lockup.cancelMultiple({ streamIds: Solarray.uint256s(notCancelableStreamId) }); } - function test_RevertWhen_SomeStreamsNotCancelable() + function test_RevertGiven_SomeStreamsNotCancelable() external whenNotDelegateCalled whenArrayCountNotZero - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerAuthorizedAllStreams { uint256 notCancelableStreamId = createDefaultStreamNotCancelable(); @@ -209,10 +209,10 @@ abstract contract CancelMultiple_Integration_Concrete_Test is function test_CancelMultiple() external whenNotDelegateCalled - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerAuthorizedAllStreams - whenAllStreamsCancelable + givenAllStreamsCancelable { // Simulate the passage of time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); diff --git a/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.tree b/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.tree index 54e39dcfc..2b7439c4b 100644 --- a/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.tree +++ b/test/integration/concrete/lockup/cancel-multiple/cancelMultiple.tree @@ -5,16 +5,16 @@ cancelMultiple.t.sol ├── when the array count is zero │ └── it should do nothing └── when the array count is not zero - ├── when the stream ids array references only null streams + ├── given the stream ids array references only null streams │ └── it should revert - ├── when the stream ids array references some null streams + ├── given the stream ids array references some null streams │ └── it should revert - └── when the stream ids array references only streams that are not null - ├── when all streams are cold + └── given the stream ids array references only streams that are not null + ├── given all streams are cold │ └── it should revert - ├── when some streams are cold + ├── given some streams are cold │ └── it should revert - └── when all streams are warm + └── given all streams are warm ├── when the caller is unauthorized for all streams │ ├── when the caller is a malicious third party │ │ └── it should revert @@ -30,11 +30,11 @@ cancelMultiple.t.sol │ └── when the caller is a former recipient │ └── it should revert └── when the caller is authorized for all streams - ├── when all streams are not cancelable + ├── given all streams are not cancelable │ └── it should revert - ├── when some streams are not cancelable + ├── given some streams are not cancelable │ └── it should revert - └── when all streams are cancelable + └── given all streams are cancelable ├── when the caller is the sender │ ├── it should cancel the streams │ ├── it should refund the sender diff --git a/test/integration/concrete/lockup/cancel/cancel.t.sol b/test/integration/concrete/lockup/cancel/cancel.t.sol index fa7460062..50b5e5012 100644 --- a/test/integration/concrete/lockup/cancel/cancel.t.sol +++ b/test/integration/concrete/lockup/cancel/cancel.t.sol @@ -22,27 +22,27 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I expectRevertDueToDelegateCall(success, returnData); } - function test_RevertWhen_Null() external whenNotDelegateCalled { + function test_RevertGiven_Null() external whenNotDelegateCalled { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.cancel(nullStreamId); } - function test_RevertWhen_StreamCold_StatusDepleted() external whenNotDelegateCalled whenNotNull whenStreamCold { + function test_RevertGiven_StatusDepleted() external whenNotDelegateCalled givenNotNull givenStreamCold { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamDepleted.selector, defaultStreamId)); lockup.cancel(defaultStreamId); } - function test_RevertWhen_StreamCold_StatusCanceled() external whenNotDelegateCalled whenNotNull whenStreamCold { + function test_RevertGiven_StatusCanceled() external whenNotDelegateCalled givenNotNull givenStreamCold { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamCanceled.selector, defaultStreamId)); lockup.cancel(defaultStreamId); } - function test_RevertWhen_StreamCold_StatusSettled() external whenNotDelegateCalled whenNotNull whenStreamCold { + function test_RevertGiven_StatusSettled() external whenNotDelegateCalled givenNotNull givenStreamCold { vm.warp({ timestamp: defaults.END_TIME() }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamSettled.selector, defaultStreamId)); lockup.cancel(defaultStreamId); @@ -51,8 +51,8 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_RevertWhen_CallerUnauthorized_MaliciousThirdParty() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerUnauthorized { // Make Eve the caller in this test. @@ -68,8 +68,8 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_RevertWhen_CallerUnauthorized_ApprovedOperator() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerUnauthorized { // Approve Alice for the stream. @@ -89,8 +89,8 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_RevertWhen_CallerUnauthorized_FormerRecipient() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerUnauthorized { // Transfer the stream to Alice. @@ -104,11 +104,11 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I lockup.cancel(defaultStreamId); } - function test_RevertWhen_StreamNotCancelable() + function test_RevertGiven_StreamNotCancelable() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized { uint256 streamId = createDefaultStreamNotCancelable(); @@ -136,11 +136,11 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerSender_RecipientNotContract() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerSender { lockup.cancel(defaultStreamId); @@ -152,13 +152,13 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerSender_RecipientDoesNotImplementHook() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerSender - whenRecipientContract + givenRecipientContract { // Create the stream with a no-op contract as the recipient. uint256 streamId = createDefaultStreamWithRecipient(address(noop)); @@ -185,14 +185,14 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerSender_RecipientReverts() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerSender - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook { // Create the stream with a reverting contract as the stream's recipient. uint256 streamId = createDefaultStreamWithRecipient(address(revertingRecipient)); @@ -219,14 +219,14 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerSender_RecipientReentrancy() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerSender - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert { // Create the stream with a reentrant contract as the recipient. @@ -254,14 +254,14 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerSender() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerSender - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert whenNoRecipientReentrancy { @@ -313,11 +313,11 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerRecipient_SenderNotContract() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerRecipient { lockup.cancel(defaultStreamId); @@ -329,13 +329,13 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerRecipient_SenderDoesNotImplementHook() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerRecipient - whenSenderContract + givenSenderContract { // Create a stream with a no-op contract as the stream's sender. uint256 streamId = createDefaultStreamWithSender(address(noop)); @@ -362,14 +362,14 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerRecipient_SenderReverts() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerRecipient - whenSenderContract - whenSenderImplementsHook + givenSenderContract + givenSenderImplementsHook { // Create a stream with a reverting contract as the stream's sender. uint256 streamId = createDefaultStreamWithSender(address(revertingSender)); @@ -396,14 +396,14 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerRecipient_SenderReentrancy() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerRecipient - whenSenderContract - whenSenderImplementsHook + givenSenderContract + givenSenderImplementsHook whenSenderDoesNotRevert { // Create a stream with a reentrant contract as the stream's sender. @@ -431,14 +431,14 @@ abstract contract Cancel_Integration_Concrete_Test is Integration_Test, Cancel_I function test_Cancel_CallerRecipient() external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerRecipient - whenSenderContract - whenSenderImplementsHook + givenSenderContract + givenSenderImplementsHook whenSenderDoesNotRevert whenNoSenderReentrancy { diff --git a/test/integration/concrete/lockup/cancel/cancel.tree b/test/integration/concrete/lockup/cancel/cancel.tree index 9de0c075c..c1fda77c5 100644 --- a/test/integration/concrete/lockup/cancel/cancel.tree +++ b/test/integration/concrete/lockup/cancel/cancel.tree @@ -2,17 +2,17 @@ cancel.t.sol ├── when delegate called │ └── it should revert └── when not delegate called - ├── when the id references a null stream + ├── given the id references a null stream │ └── it should revert - └── when the id does not reference a null stream - ├── when the stream is cold - │ ├── when the stream's status is "DEPLETED" + └── given the id does not reference a null stream + ├── given the stream is cold + │ ├── given the stream's status is "DEPLETED" │ │ └── it should revert - │ ├── when the stream's status is "CANCELED" + │ ├── given the stream's status is "CANCELED" │ │ └── it should revert - │ └── when the stream's status is "SETTLED" + │ └── given the stream's status is "SETTLED" │ └── it should revert - └── when the stream is warm + └── given the stream is warm ├── when the caller is unauthorized │ ├── when the caller is a malicious third party │ │ └── it should revert @@ -21,25 +21,25 @@ cancel.t.sol │ └── when the caller is a former recipient │ └── it should revert └── when the caller is authorized - ├── when the stream is not cancelable + ├── given the stream is not cancelable │ └── it should revert - └── when the stream is cancelable - ├── when the stream's status is "PENDING" + └── given the stream is cancelable + ├── given the stream's status is "PENDING" │ ├── it should cancel the stream │ ├── it should mark the stream as depleted │ └── it should make the stream not cancelable - └── when the stream's status is "STREAMING" + └── given the stream's status is "STREAMING" ├── when the caller is the sender - │ ├── when the recipient is not a contract + │ ├── given the recipient is not a contract │ │ ├── it should cancel the stream │ │ └── it should mark the stream as canceled - │ └── when the recipient is a contract - │ ├── when the recipient does not implement the hook + │ └── given the recipient is a contract + │ ├── given the recipient does not implement the hook │ │ ├── it should cancel the stream │ │ ├── it should mark the stream as canceled │ │ ├── it should call the recipient hook │ │ └── it should ignore the revert - │ └── when the recipient implements the hook + │ └── given the recipient implements the hook │ ├── when the recipient reverts │ │ ├── it should cancel the stream │ │ ├── it should mark the stream as canceled @@ -61,16 +61,16 @@ cancel.t.sol │ ├── it should emit a {CancelLockupStream} event │ └── it should emit a {MetadataUpdate} event └── when the caller is the recipient - ├── when the sender is not a contract + ├── given the sender is not a contract │ ├── it should cancel the stream │ └── it should mark the stream as canceled - └── when the sender is a contract - ├── when the sender does not implement the hook + └── given the sender is a contract + ├── given the sender does not implement the hook │ ├── it should cancel the stream │ ├── it should mark the stream as canceled │ ├── it should call the sender hook │ └── it should ignore the revert - └── when the sender implements the hook + └── given the sender implements the hook ├── when the sender reverts │ ├── it should cancel the stream │ ├── it should mark the stream as canceled diff --git a/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.t.sol b/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.t.sol index 3952c776a..820ad51f9 100644 --- a/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.t.sol +++ b/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.t.sol @@ -27,12 +27,12 @@ abstract contract ClaimProtocolRevenues_Integration_Concrete_Test is _; } - function test_RevertWhen_ProtocolRevenuesZero() external whenCallerAdmin { + function test_RevertGiven_ProtocolRevenuesZero() external whenCallerAdmin { vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Base_NoProtocolRevenues.selector, dai)); base.claimProtocolRevenues(dai); } - modifier whenProtocolRevenuesNotZero() { + modifier givenProtocolRevenuesNotZero() { // Create the default stream, which will accrue revenues for the protocol. changePrank({ msgSender: users.sender }); createDefaultStream(); @@ -40,7 +40,7 @@ abstract contract ClaimProtocolRevenues_Integration_Concrete_Test is _; } - function test_ClaimProtocolRevenues() external whenCallerAdmin whenProtocolRevenuesNotZero { + function test_ClaimProtocolRevenues() external whenCallerAdmin givenProtocolRevenuesNotZero { // Expect the protocol revenues to be claimed. uint128 protocolRevenues = defaults.PROTOCOL_FEE_AMOUNT(); expectCallToTransfer({ to: users.admin, amount: protocolRevenues }); diff --git a/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.tree b/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.tree index 98501177c..46d8c91c0 100644 --- a/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.tree +++ b/test/integration/concrete/lockup/claim-protocol-revenues/claimProtocolRevenues.tree @@ -2,9 +2,9 @@ claimProtocolRevenues.t.sol ├── when the caller is not the admin │ └── it should revert └── when the caller is the admin - ├── when the protocol revenues are zero + ├── given the protocol revenues are zero │ └── it should revert - └── when the protocol revenues are not zero + └── given the protocol revenues are not zero ├── it should claim the protocol revenues ├── it should update the protocol revenues └── it should emit a {ClaimProtocolRevenues} event diff --git a/test/integration/concrete/lockup/get-asset/getAsset.t.sol b/test/integration/concrete/lockup/get-asset/getAsset.t.sol index 32a9bb5f6..b43d23a58 100644 --- a/test/integration/concrete/lockup/get-asset/getAsset.t.sol +++ b/test/integration/concrete/lockup/get-asset/getAsset.t.sol @@ -11,17 +11,17 @@ import { Integration_Test } from "../../../Integration.t.sol"; abstract contract GetAsset_Integration_Concrete_Test is Integration_Test, Lockup_Integration_Shared_Test { function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getAsset(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetAsset() external whenNotNull { + function test_GetAsset() external givenNotNull { uint256 streamId = createDefaultStream(); IERC20 actualAsset = lockup.getAsset(streamId); IERC20 expectedAsset = dai; diff --git a/test/integration/concrete/lockup/get-asset/getAsset.tree b/test/integration/concrete/lockup/get-asset/getAsset.tree index 91f78326a..01bde9485 100644 --- a/test/integration/concrete/lockup/get-asset/getAsset.tree +++ b/test/integration/concrete/lockup/get-asset/getAsset.tree @@ -1,5 +1,5 @@ getAsset.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct address of the asset diff --git a/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.t.sol b/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.t.sol index 6d5327e34..97fcfd666 100644 --- a/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.t.sol +++ b/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.t.sol @@ -9,17 +9,17 @@ import { Integration_Test } from "../../../Integration.t.sol"; abstract contract GetDepositedAmount_Integration_Concrete_Test is Integration_Test, Lockup_Integration_Shared_Test { function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getDepositedAmount(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetDepositedAmount() external whenNotNull { + function test_GetDepositedAmount() external givenNotNull { uint256 streamId = createDefaultStream(); uint128 actualDepositedAmount = lockup.getDepositedAmount(streamId); uint128 expectedDepositedAmount = defaults.DEPOSIT_AMOUNT(); diff --git a/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.tree b/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.tree index 4749b1c97..5254069e5 100644 --- a/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.tree +++ b/test/integration/concrete/lockup/get-deposited-amount/getDepositedAmount.tree @@ -1,5 +1,5 @@ getDepositedAmount.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct deposited amount diff --git a/test/integration/concrete/lockup/get-end-time/getEndTime.t.sol b/test/integration/concrete/lockup/get-end-time/getEndTime.t.sol index 9671121e4..f6c6090dc 100644 --- a/test/integration/concrete/lockup/get-end-time/getEndTime.t.sol +++ b/test/integration/concrete/lockup/get-end-time/getEndTime.t.sol @@ -9,17 +9,17 @@ import { Integration_Test } from "../../../Integration.t.sol"; abstract contract GetEndTime_Integration_Concrete_Test is Integration_Test, Lockup_Integration_Shared_Test { function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getEndTime(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetEndTime() external whenNotNull { + function test_GetEndTime() external givenNotNull { uint256 streamId = createDefaultStream(); uint40 actualEndTime = lockup.getEndTime(streamId); uint40 expectedEndTime = defaults.END_TIME(); diff --git a/test/integration/concrete/lockup/get-end-time/getEndTime.tree b/test/integration/concrete/lockup/get-end-time/getEndTime.tree index ce255b4e6..20359c089 100644 --- a/test/integration/concrete/lockup/get-end-time/getEndTime.tree +++ b/test/integration/concrete/lockup/get-end-time/getEndTime.tree @@ -1,5 +1,5 @@ getEndTime.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct end time diff --git a/test/integration/concrete/lockup/get-recipient/getRecipient.t.sol b/test/integration/concrete/lockup/get-recipient/getRecipient.t.sol index d2ee2cec6..3e6c06d47 100644 --- a/test/integration/concrete/lockup/get-recipient/getRecipient.t.sol +++ b/test/integration/concrete/lockup/get-recipient/getRecipient.t.sol @@ -11,17 +11,17 @@ abstract contract GetRecipient_Integration_Concrete_Test is Integration_Test, Lo defaultStreamId = createDefaultStream(); } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert("ERC721: invalid token ID"); lockup.getRecipient(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_RevertWhen_NFTBurned() external { + function test_RevertGiven_NFTBurned() external { // Simulate the passage of time. vm.warp({ timestamp: defaults.END_TIME() }); @@ -39,11 +39,11 @@ abstract contract GetRecipient_Integration_Concrete_Test is Integration_Test, Lo lockup.getRecipient(defaultStreamId); } - modifier whenNFTNotBurned() { + modifier givenNFTNotBurned() { _; } - function test_GetRecipient() external whenNotNull whenNFTNotBurned { + function test_GetRecipient() external givenNotNull givenNFTNotBurned { address actualRecipient = lockup.getRecipient(defaultStreamId); address expectedRecipient = users.recipient; assertEq(actualRecipient, expectedRecipient, "recipient"); diff --git a/test/integration/concrete/lockup/get-recipient/getRecipient.tree b/test/integration/concrete/lockup/get-recipient/getRecipient.tree index 6beaff846..5b33ed4a0 100644 --- a/test/integration/concrete/lockup/get-recipient/getRecipient.tree +++ b/test/integration/concrete/lockup/get-recipient/getRecipient.tree @@ -1,8 +1,8 @@ getRecipient.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the NFT has been burned +└── given the id does not reference a null stream + ├── given the NFT has been burned │ └── it should revert - └── when the NFT exists + └── given the NFT has not been burned └── it should return the correct recipient diff --git a/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.t.sol b/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.t.sol index 002975a1a..70951a7e8 100644 --- a/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.t.sol +++ b/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.t.sol @@ -11,25 +11,25 @@ abstract contract GetRefundedAmount_Integration_Concrete_Test is Integration_Tes function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getRefundedAmount(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - modifier whenStreamHasBeenCanceled() { + modifier givenStreamHasBeenCanceled() { _; } function test_GetRefundedAmount_StreamHasBeenCanceled_StatusCanceled() external - whenNotNull - whenStreamHasBeenCanceled + givenNotNull + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -40,8 +40,8 @@ abstract contract GetRefundedAmount_Integration_Concrete_Test is Integration_Tes function test_GetRefundedAmount_StreamHasBeenCanceled_StatusDepleted() external - whenNotNull - whenStreamHasBeenCanceled + givenNotNull + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -51,32 +51,32 @@ abstract contract GetRefundedAmount_Integration_Concrete_Test is Integration_Tes assertEq(actualRefundedAmount, expectedRefundedAmount, "refundedAmount"); } - modifier whenStreamHasNotBeenCanceled() { + modifier givenStreamHasNotBeenCanceled() { _; } - function test_GetRefundedAmount_StatusPending() external whenNotNull whenStreamHasNotBeenCanceled { + function test_GetRefundedAmount_StatusPending() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); uint128 actualRefundedAmount = lockup.getRefundedAmount(defaultStreamId); uint128 expectedRefundedAmount = 0; assertEq(actualRefundedAmount, expectedRefundedAmount, "refundedAmount"); } - function test_GetRefundedAmount_StatusStreaming() external whenNotNull whenStreamHasNotBeenCanceled { + function test_GetRefundedAmount_StatusStreaming() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); uint128 actualRefundedAmount = lockup.getRefundedAmount(defaultStreamId); uint128 expectedRefundedAmount = 0; assertEq(actualRefundedAmount, expectedRefundedAmount, "refundedAmount"); } - function test_GetRefundedAmount_StatusSettled() external whenNotNull whenStreamHasNotBeenCanceled { + function test_GetRefundedAmount_StatusSettled() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); uint128 actualRefundedAmount = lockup.getRefundedAmount(defaultStreamId); uint128 expectedRefundedAmount = 0; assertEq(actualRefundedAmount, expectedRefundedAmount, "refundedAmount"); } - function test_GetRefundedAmount_StatusDepleted() external whenNotNull whenStreamHasNotBeenCanceled { + function test_GetRefundedAmount_StatusDepleted() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); uint128 actualRefundedAmount = lockup.getRefundedAmount(defaultStreamId); diff --git a/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.tree b/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.tree index 8c3be2d09..3a8aa8645 100644 --- a/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.tree +++ b/test/integration/concrete/lockup/get-refunded-amount/getRefundedAmount.tree @@ -1,18 +1,18 @@ getRefundedAmount.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream has been canceled - │ ├── when the stream's status is "CANCELED" +└── given the id does not reference a null stream + ├── given the stream has been canceled + │ ├── given the stream's status is "CANCELED" │ │ └── it should return the correct refunded amount - │ └── when the stream's status is "DEPLETED" + │ └── given the stream's status is "DEPLETED" │ └── it should return the correct refunded amount - └── when the stream has not been canceled - ├── when the stream's status is "PENDING" + └── given the stream has not been canceled + ├── given the stream's status is "PENDING" │ └── it should return zero - ├── when the stream's status is "SETTLED" + ├── given the stream's status is "SETTLED" │ └── it should return zero - ├── when the stream's status is "DEPLETED" + ├── given the stream's status is "DEPLETED" │ └── it should return zero - └── when the stream's status is "STREAMING" + └── given the stream's status is "STREAMING" └── it should return zero diff --git a/test/integration/concrete/lockup/get-sender/getSender.t.sol b/test/integration/concrete/lockup/get-sender/getSender.t.sol index 028e481ac..f4a008439 100644 --- a/test/integration/concrete/lockup/get-sender/getSender.t.sol +++ b/test/integration/concrete/lockup/get-sender/getSender.t.sol @@ -9,17 +9,17 @@ import { Integration_Test } from "../../../Integration.t.sol"; abstract contract GetSender_Integration_Concrete_Test is Integration_Test, Lockup_Integration_Shared_Test { function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getSender(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetSender() external whenNotNull { + function test_GetSender() external givenNotNull { uint256 streamId = createDefaultStream(); address actualSender = lockup.getSender(streamId); address expectedSender = users.sender; diff --git a/test/integration/concrete/lockup/get-sender/getSender.tree b/test/integration/concrete/lockup/get-sender/getSender.tree index 6a1179edf..50160b661 100644 --- a/test/integration/concrete/lockup/get-sender/getSender.tree +++ b/test/integration/concrete/lockup/get-sender/getSender.tree @@ -1,5 +1,5 @@ getSender.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct sender diff --git a/test/integration/concrete/lockup/get-start-time/getStartTime.t.sol b/test/integration/concrete/lockup/get-start-time/getStartTime.t.sol index 8efa6ce37..910091a40 100644 --- a/test/integration/concrete/lockup/get-start-time/getStartTime.t.sol +++ b/test/integration/concrete/lockup/get-start-time/getStartTime.t.sol @@ -9,17 +9,17 @@ import { Integration_Test } from "../../../Integration.t.sol"; abstract contract GetStartTime_Integration_Concrete_Test is Integration_Test, Lockup_Integration_Shared_Test { function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getStartTime(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - function test_GetStartTime() external whenNotNull { + function test_GetStartTime() external givenNotNull { uint256 streamId = createDefaultStream(); uint40 actualStartTime = lockup.getStartTime(streamId); uint40 expectedStartTime = defaults.START_TIME(); diff --git a/test/integration/concrete/lockup/get-start-time/getStartTime.tree b/test/integration/concrete/lockup/get-start-time/getStartTime.tree index f4c9ce284..d65e107ab 100644 --- a/test/integration/concrete/lockup/get-start-time/getStartTime.tree +++ b/test/integration/concrete/lockup/get-start-time/getStartTime.tree @@ -1,5 +1,5 @@ getStartTime.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return the correct start time diff --git a/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.t.sol b/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.t.sol index 534c2c2a1..a7d636336 100644 --- a/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.t.sol +++ b/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.t.sol @@ -14,13 +14,13 @@ abstract contract GetWithdrawnAmount_Integration_Concrete_Test is GetWithdrawnAmount_Integration_Shared_Test.setUp(); } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.getWithdrawnAmount(nullStreamId); } - function test_GetWithdrawnAmount_NoPreviousWithdrawals() external whenNotNull { + function test_GetWithdrawnAmount_NoPreviousWithdrawals() external givenNotNull { // Simulate the passage of time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); @@ -30,7 +30,7 @@ abstract contract GetWithdrawnAmount_Integration_Concrete_Test is assertEq(actualWithdrawnAmount, expectedWithdrawnAmount, "withdrawnAmount"); } - function test_GetWithdrawnAmount() external whenNotNull whenPreviousWithdrawals { + function test_GetWithdrawnAmount() external givenNotNull givenPreviousWithdrawals { // Simulate the passage of time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); diff --git a/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.tree b/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.tree index f4841be4c..2a88d73c9 100644 --- a/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.tree +++ b/test/integration/concrete/lockup/get-withdrawn-amount/getWithdrawnAmount.tree @@ -1,8 +1,8 @@ getWithdrawnAmount.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when there are no previous withdrawals +└── given the id does not reference a null stream + ├── given there are no previous withdrawals │ └── it should return zero - └── when there are previous withdrawals + └── given there are previous withdrawals └── it should return the correct withdrawn amount diff --git a/test/integration/concrete/lockup/is-cancelable/isCancelable.t.sol b/test/integration/concrete/lockup/is-cancelable/isCancelable.t.sol index f0765c744..b773ade31 100644 --- a/test/integration/concrete/lockup/is-cancelable/isCancelable.t.sol +++ b/test/integration/concrete/lockup/is-cancelable/isCancelable.t.sol @@ -11,37 +11,37 @@ abstract contract IsCancelable_Integration_Concrete_Test is Integration_Test, Lo function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.isCancelable(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_IsCancelable_Cold() external whenNotNull { + function test_IsCancelable_Cold() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); // settled status bool isCancelable = lockup.isCancelable(defaultStreamId); assertFalse(isCancelable, "isCancelable"); } - modifier whenNotCold() { + modifier givenNotCold() { _; } - function test_IsCancelable_StreamCancelable() external whenNotNull whenNotCold { + function test_IsCancelable_StreamCancelable() external givenNotNull givenNotCold { bool isCancelable = lockup.isCancelable(defaultStreamId); assertTrue(isCancelable, "isCancelable"); } - modifier whenStreamNotCancelable() { + modifier givenStreamNotCancelable() { _; } - function test_IsCancelable() external whenNotNull whenNotCold whenStreamNotCancelable { + function test_IsCancelable() external givenNotNull givenNotCold givenStreamNotCancelable { uint256 streamId = createDefaultStreamNotCancelable(); bool isCancelable = lockup.isCancelable(streamId); assertFalse(isCancelable, "isCancelable"); diff --git a/test/integration/concrete/lockup/is-cancelable/isCancelable.tree b/test/integration/concrete/lockup/is-cancelable/isCancelable.tree index 2f0e9eb9a..8a36d6dbe 100644 --- a/test/integration/concrete/lockup/is-cancelable/isCancelable.tree +++ b/test/integration/concrete/lockup/is-cancelable/isCancelable.tree @@ -1,11 +1,11 @@ isCancelable.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream is cold +└── given the id does not reference a null stream + ├── given the stream is cold │ └── it should return true - └── when the stream is not cold - ├── when the stream is cancelable + └── given the stream is not cold + ├── given the stream is cancelable │ └── it should return true - └── when the stream is not cancelable + └── given the stream is not cancelable └── it should return false diff --git a/test/integration/concrete/lockup/is-cold/isCold.t.sol b/test/integration/concrete/lockup/is-cold/isCold.t.sol index 7ba4a5088..214512228 100644 --- a/test/integration/concrete/lockup/is-cold/isCold.t.sol +++ b/test/integration/concrete/lockup/is-cold/isCold.t.sol @@ -11,43 +11,43 @@ abstract contract IsCold_Integration_Concrete_Test is Integration_Test, Lockup_I function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.isCold(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_IsCold_StatusPending() external whenNotNull { + function test_IsCold_StatusPending() external givenNotNull { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); bool isCold = lockup.isCold(defaultStreamId); assertFalse(isCold, "isCold"); } - function test_IsCold_StatusStreaming() external whenNotNull { + function test_IsCold_StatusStreaming() external givenNotNull { vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); bool isCold = lockup.isCold(defaultStreamId); assertFalse(isCold, "isCold"); } - function test_IsCold_StatusSettled() external whenNotNull { + function test_IsCold_StatusSettled() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); bool isCold = lockup.isCold(defaultStreamId); assertTrue(isCold, "isCold"); } - function test_IsCold_StatusCanceled() external whenNotNull { + function test_IsCold_StatusCanceled() external givenNotNull { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); bool isCold = lockup.isCold(defaultStreamId); assertTrue(isCold, "isCold"); } - function test_IsCold_StatusDepleted() external whenNotNull { + function test_IsCold_StatusDepleted() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); bool isCold = lockup.isCold(defaultStreamId); diff --git a/test/integration/concrete/lockup/is-cold/isCold.tree b/test/integration/concrete/lockup/is-cold/isCold.tree index 963c12cf6..15bfe3fdc 100644 --- a/test/integration/concrete/lockup/is-cold/isCold.tree +++ b/test/integration/concrete/lockup/is-cold/isCold.tree @@ -1,14 +1,14 @@ isCold.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream's status is pending +└── given the id does not reference a null stream + ├── given the stream's status is pending │ └── it should return false - ├── when the stream's status is streaming + ├── given the stream's status is streaming │ └── it should return false - ├── when the stream's status is settled + ├── given the stream's status is settled │ └── it should return true - ├── when the stream's status is canceled + ├── given the stream's status is canceled │ └── it should return true - └── when the stream's status is depleted + └── given the stream's status is depleted └── it should return true diff --git a/test/integration/concrete/lockup/is-depleted/isDepleted.t.sol b/test/integration/concrete/lockup/is-depleted/isDepleted.t.sol index 43b9ddd4a..6d969a5e8 100644 --- a/test/integration/concrete/lockup/is-depleted/isDepleted.t.sol +++ b/test/integration/concrete/lockup/is-depleted/isDepleted.t.sol @@ -11,29 +11,29 @@ abstract contract IsDepleted_Integration_Concrete_Test is Integration_Test, Lock function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.isDepleted(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_IsDepleted_StreamNotDepleted() external whenNotNull { + function test_IsDepleted_StreamNotDepleted() external givenNotNull { bool isDepleted = lockup.isDepleted(defaultStreamId); assertFalse(isDepleted, "isDepleted"); } - modifier whenStreamDepleted() { + modifier givenStreamDepleted() { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); _; } - function test_IsDepleted() external whenNotNull whenStreamDepleted { + function test_IsDepleted() external givenNotNull givenStreamDepleted { bool isDepleted = lockup.isDepleted(defaultStreamId); assertTrue(isDepleted, "isDepleted"); } diff --git a/test/integration/concrete/lockup/is-depleted/isDepleted.tree b/test/integration/concrete/lockup/is-depleted/isDepleted.tree index e4a5777bb..43149d5aa 100644 --- a/test/integration/concrete/lockup/is-depleted/isDepleted.tree +++ b/test/integration/concrete/lockup/is-depleted/isDepleted.tree @@ -1,8 +1,8 @@ isDepleted.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream is not depleted +└── given the id does not reference a null stream + ├── given the stream is not depleted │ └── it should return false - └── when the stream is depleted + └── given the stream is depleted └── it should return true diff --git a/test/integration/concrete/lockup/is-stream/isStream.t.sol b/test/integration/concrete/lockup/is-stream/isStream.t.sol index 645272653..fd44ba2ce 100644 --- a/test/integration/concrete/lockup/is-stream/isStream.t.sol +++ b/test/integration/concrete/lockup/is-stream/isStream.t.sol @@ -15,12 +15,12 @@ abstract contract IsStream_Integration_Concrete_Test is Integration_Test, Lockup assertFalse(isStream, "isStream"); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_IsStream() external whenNotNull { + function test_IsStream() external givenNotNull { bool isStream = lockup.isStream(defaultStreamId); assertTrue(isStream, "isStream"); } diff --git a/test/integration/concrete/lockup/is-stream/isStream.tree b/test/integration/concrete/lockup/is-stream/isStream.tree index e5c215df9..7510ebfc6 100644 --- a/test/integration/concrete/lockup/is-stream/isStream.tree +++ b/test/integration/concrete/lockup/is-stream/isStream.tree @@ -1,5 +1,5 @@ isStream.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should return true -└── when the id does not reference a null stream +└── given the id does not reference a null stream └── it should return true diff --git a/test/integration/concrete/lockup/is-warm/isWarm.t.sol b/test/integration/concrete/lockup/is-warm/isWarm.t.sol index 3c9442aa2..91e2c934d 100644 --- a/test/integration/concrete/lockup/is-warm/isWarm.t.sol +++ b/test/integration/concrete/lockup/is-warm/isWarm.t.sol @@ -11,43 +11,43 @@ abstract contract IsWarm_Integration_Concrete_Test is Integration_Test, Lockup_I function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.isWarm(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_IsWarm_StatusPending() external whenNotNull { + function test_IsWarm_StatusPending() external givenNotNull { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); bool isWarm = lockup.isWarm(defaultStreamId); assertTrue(isWarm, "isWarm"); } - function test_IsWarm_StatusStreaming() external whenNotNull { + function test_IsWarm_StatusStreaming() external givenNotNull { vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); bool isWarm = lockup.isWarm(defaultStreamId); assertTrue(isWarm, "isWarm"); } - function test_IsWarm_StatusSettled() external whenNotNull { + function test_IsWarm_StatusSettled() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); bool isWarm = lockup.isWarm(defaultStreamId); assertFalse(isWarm, "isWarm"); } - function test_IsWarm_StatusCanceled() external whenNotNull { + function test_IsWarm_StatusCanceled() external givenNotNull { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); bool isWarm = lockup.isWarm(defaultStreamId); assertFalse(isWarm, "isWarm"); } - function test_IsWarm_StatusDepleted() external whenNotNull { + function test_IsWarm_StatusDepleted() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); bool isWarm = lockup.isWarm(defaultStreamId); diff --git a/test/integration/concrete/lockup/is-warm/isWarm.tree b/test/integration/concrete/lockup/is-warm/isWarm.tree index 61ab3c0b8..be21fe1d1 100644 --- a/test/integration/concrete/lockup/is-warm/isWarm.tree +++ b/test/integration/concrete/lockup/is-warm/isWarm.tree @@ -1,14 +1,14 @@ isWarm.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream's status is pending +└── given the id does not reference a null stream + ├── given the stream's status is pending │ └── it should return true - ├── when the stream's status is streaming + ├── given the stream's status is streaming │ └── it should return true - ├── when the stream's status is settled + ├── given the stream's status is settled │ └── it should return false - ├── when the stream's status is canceled + ├── given the stream's status is canceled │ └── it should return false - └── when the stream's status is depleted + └── given the stream's status is depleted └── it should return false diff --git a/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.t.sol b/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.t.sol index 2aba85235..b42cbe56b 100644 --- a/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.t.sol +++ b/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.t.sol @@ -13,7 +13,7 @@ abstract contract ProtocolRevenues_Integration_Concrete_Test is Integration_Test assertEq(actualProtocolRevenues, expectedProtocolRevenues, "protocolRevenues"); } - modifier whenProtocolRevenuesNotZero() { + modifier givenProtocolRevenuesNotZero() { // Create the default stream, which will accrue revenues for the protocol. changePrank({ msgSender: users.sender }); createDefaultStream(); @@ -21,7 +21,7 @@ abstract contract ProtocolRevenues_Integration_Concrete_Test is Integration_Test _; } - function test_ProtocolRevenues() external whenProtocolRevenuesNotZero { + function test_ProtocolRevenues() external givenProtocolRevenuesNotZero { uint128 actualProtocolRevenues = base.protocolRevenues(dai); uint128 expectedProtocolRevenues = defaults.PROTOCOL_FEE_AMOUNT(); assertEq(actualProtocolRevenues, expectedProtocolRevenues, "protocolRevenues"); diff --git a/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.tree b/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.tree index 2fd019c03..7c575e2f0 100644 --- a/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.tree +++ b/test/integration/concrete/lockup/protocol-revenues/protocolRevenues.tree @@ -1,5 +1,5 @@ protocolRevenues.t.sol -├── when the protocol revenues are zero +├── given the protocol revenues are zero │ └── it should return zero -└── when the protocol revenues are not zero +└── given the protocol revenues are not zero └── it should return the correct protocol revenues diff --git a/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.t.sol b/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.t.sol index 3d9946497..df7d7381e 100644 --- a/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.t.sol +++ b/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.t.sol @@ -11,18 +11,18 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.refundableAmountOf(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_RefundableAmountOf_StreamNotCancelable() external whenNotNull { + function test_RefundableAmountOf_StreamNotCancelable() external givenNotNull { uint256 streamId = createDefaultStreamNotCancelable(); vm.warp({ timestamp: defaults.CLIFF_TIME() }); uint128 actualRefundableAmount = lockup.refundableAmountOf(streamId); @@ -30,19 +30,19 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te assertEq(actualRefundableAmount, expectedRefundableAmount, "refundableAmount"); } - modifier whenStreamIsCancelable() { + modifier givenStreamIsCancelable() { _; } - modifier whenStreamHasBeenCanceled() { + modifier givenStreamHasBeenCanceled() { _; } function test_RefundableAmountOf_StreamHasBeenCanceled_StatusCanceled() external - whenNotNull - whenStreamIsCancelable - whenStreamHasBeenCanceled + givenNotNull + givenStreamIsCancelable + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -54,9 +54,9 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te /// @dev This test warps a second time to ensure that {refundableAmountOf} ignores the current time. function test_RefundableAmountOf_StreamHasBeenCanceled_StatusDepleted() external - whenNotNull - whenStreamIsCancelable - whenStreamHasBeenCanceled + givenNotNull + givenStreamIsCancelable + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -67,15 +67,15 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te assertEq(actualRefundableAmount, expectedRefundableAmount, "refundableAmount"); } - modifier whenStreamHasNotBeenCanceled() { + modifier givenStreamHasNotBeenCanceled() { _; } function test_RefundableAmountOf_StatusPending() external - whenNotNull - whenStreamIsCancelable - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamIsCancelable + givenStreamHasNotBeenCanceled { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); uint128 actualRefundableAmount = lockup.refundableAmountOf(defaultStreamId); @@ -85,9 +85,9 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te function test_RefundableAmountOf_StatusStreaming() external - whenNotNull - whenStreamIsCancelable - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamIsCancelable + givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); uint128 actualRefundableAmount = lockup.refundableAmountOf(defaultStreamId); @@ -97,9 +97,9 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te function test_RefundableAmountOf_StatusSettled() external - whenNotNull - whenStreamIsCancelable - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamIsCancelable + givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); uint128 actualRefundableAmount = lockup.refundableAmountOf(defaultStreamId); @@ -109,9 +109,9 @@ abstract contract RefundableAmountOf_Integration_Concrete_Test is Integration_Te function test_RefundableAmountOf_StatusDepleted() external - whenNotNull - whenStreamIsCancelable - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamIsCancelable + givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); diff --git a/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.tree b/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.tree index 65b0a9c5c..ebfdbcdad 100644 --- a/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.tree +++ b/test/integration/concrete/lockup/refundable-amount-of/refundableAmountOf.tree @@ -1,21 +1,21 @@ refundableAmountOf.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream is not cancelable +└── given the id does not reference a null stream + ├── given the stream is not cancelable │ └── it should return zero - └── when the stream is cancelable - ├── when the stream has been canceled - │ ├── when the stream's status is "CANCELED" + └── given the stream is cancelable + ├── given the stream has been canceled + │ ├── given the stream's status is "CANCELED" │ │ └── it should return zero - │ └── when the stream's status is "DEPLETED" + │ └── given the stream's status is "DEPLETED" │ └── it should return zero - └── when the stream has not been canceled - ├── when the stream's status is "PENDING" + └── given the stream has not been canceled + ├── given the stream's status is "PENDING" │ └── it should return the deposited amount - ├── when the stream's status is "STREAMING" + ├── given the stream's status is "STREAMING" │ └── it should return the correct refundable amount - ├── when the stream's status is "SETTLED" + ├── given the stream's status is "SETTLED" │ └── it should return zero - └── when the stream's status is "DEPLETED" + └── given the stream's status is "DEPLETED" └── it should return zero diff --git a/test/integration/concrete/lockup/renounce/renounce.t.sol b/test/integration/concrete/lockup/renounce/renounce.t.sol index 50f10d4a8..7340dc66b 100644 --- a/test/integration/concrete/lockup/renounce/renounce.t.sol +++ b/test/integration/concrete/lockup/renounce/renounce.t.sol @@ -15,7 +15,7 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup defaultStreamId = createDefaultStream(); } - function test_RevertWhen_DelegateCalled() external whenStreamWarm { + function test_RevertWhen_DelegateCalled() external givenStreamWarm { bytes memory callData = abi.encodeCall(ISablierV2Lockup.renounce, defaultStreamId); (bool success, bytes memory returnData) = address(lockup).delegatecall(callData); expectRevertDueToDelegateCall(success, returnData); @@ -25,42 +25,42 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup _; } - function test_RevertWhen_Null() external whenNotDelegateCalled { + function test_RevertGiven_Null() external whenNotDelegateCalled { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.renounce(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - modifier whenStreamCold() { + modifier givenStreamCold() { _; } - function test_RevertWhen_StreamCold_StatusDepleted() external whenNotDelegateCalled whenStreamCold { + function test_RevertGiven_StatusDepleted() external whenNotDelegateCalled givenStreamCold { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamDepleted.selector, defaultStreamId)); lockup.renounce(defaultStreamId); } - function test_RevertWhen_StreamCold_StatusCanceled() external whenNotDelegateCalled whenStreamCold { + function test_RevertGiven_StatusCanceled() external whenNotDelegateCalled givenStreamCold { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamCanceled.selector, defaultStreamId)); lockup.renounce(defaultStreamId); } - function test_RevertWhen_StreamCold_StatusSettled() external whenNotDelegateCalled whenStreamCold { + function test_RevertGiven_StatusSettled() external whenNotDelegateCalled givenStreamCold { vm.warp({ timestamp: defaults.END_TIME() }); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_StreamSettled.selector, defaultStreamId)); lockup.renounce(defaultStreamId); } /// @dev This modifier runs the test twice: once with a "PENDING" status, and once with a "STREAMING" status. - modifier whenStreamWarm() { + modifier givenStreamWarm() { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); _; vm.warp({ timestamp: defaults.START_TIME() }); @@ -68,7 +68,7 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup _; } - function test_RevertWhen_CallerNotSender() external whenNotDelegateCalled whenStreamWarm { + function test_RevertWhen_CallerNotSender() external whenNotDelegateCalled givenStreamWarm { // Make Eve the caller in this test. changePrank({ msgSender: users.eve }); @@ -83,7 +83,7 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup _; } - function test_RevertWhen_StreamNotCancelable() external whenNotDelegateCalled whenStreamWarm whenCallerSender { + function test_RevertGiven_StreamNotCancelable() external whenNotDelegateCalled givenStreamWarm whenCallerSender { // Create the not cancelable stream. uint256 notCancelableStreamId = createDefaultStreamNotCancelable(); @@ -94,33 +94,33 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup lockup.renounce(notCancelableStreamId); } - modifier whenStreamCancelable() { + modifier givenStreamCancelable() { _; } function test_Renounce_RecipientNotContract() external whenNotDelegateCalled - whenStreamWarm + givenStreamWarm whenCallerSender - whenStreamCancelable + givenStreamCancelable { lockup.renounce(defaultStreamId); bool isCancelable = lockup.isCancelable(defaultStreamId); assertFalse(isCancelable, "isCancelable"); } - modifier whenRecipientContract() { + modifier givenRecipientContract() { _; } function test_Renounce_RecipientDoesNotImplementHook() external whenNotDelegateCalled - whenStreamWarm + givenStreamWarm whenCallerSender - whenStreamCancelable - whenRecipientContract + givenStreamCancelable + givenRecipientContract { // Create the stream with a no-op contract as the stream's recipient. uint256 streamId = createDefaultStreamWithRecipient(address(noop)); @@ -136,18 +136,18 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup assertFalse(isCancelable, "isCancelable"); } - modifier whenRecipientImplementsHook() { + modifier givenRecipientImplementsHook() { _; } function test_Renounce_RecipientReverts() external whenNotDelegateCalled - whenStreamWarm + givenStreamWarm whenCallerSender - whenStreamCancelable - whenRecipientContract - whenRecipientImplementsHook + givenStreamCancelable + givenRecipientContract + givenRecipientImplementsHook { // Create the stream with a reverting contract as the stream's recipient. uint256 streamId = createDefaultStreamWithRecipient(address(revertingRecipient)); @@ -172,11 +172,11 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup function test_Renounce_RecipientReentrancy() external whenNotDelegateCalled - whenStreamWarm + givenStreamWarm whenCallerSender - whenStreamCancelable - whenRecipientContract - whenRecipientImplementsHook + givenStreamCancelable + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert { // Create the stream with a reentrant contract as the stream's recipient. @@ -202,11 +202,11 @@ abstract contract Renounce_Integration_Concrete_Test is Integration_Test, Lockup function test_Renounce() external whenNotDelegateCalled - whenStreamWarm + givenStreamWarm whenCallerSender - whenStreamCancelable - whenRecipientContract - whenRecipientImplementsHook + givenStreamCancelable + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert whenNoRecipientReentrancy { diff --git a/test/integration/concrete/lockup/renounce/renounce.tree b/test/integration/concrete/lockup/renounce/renounce.tree index 6769a04b3..be03dbc40 100644 --- a/test/integration/concrete/lockup/renounce/renounce.tree +++ b/test/integration/concrete/lockup/renounce/renounce.tree @@ -2,28 +2,28 @@ renounce.t.sol ├── when delegate called │ └── it should revert └── when not delegate called - ├── when the id references a null stream + ├── given the id references a null stream │ └── it should revert - └── when the id does not reference a null stream - ├── when the stream is cold - │ ├── when the stream's status is "DEPLETED" + └── given the id does not reference a null stream + ├── given the stream is cold + │ ├── given the stream's status is "DEPLETED" │ │ └── it should revert - │ ├── when the stream's status is "CANCELED" + │ ├── given the stream's status is "CANCELED" │ │ └── it should revert - │ └── when the stream's status is "SETTLED" + │ └── given the stream's status is "SETTLED" │ └── it should revert - └── when the stream is warm + └── given the stream is warm ├── when the caller is not the sender │ └── it should revert └── when the caller is the sender - ├── when the recipient is not a contract + ├── given the recipient is not a contract │ └── it should renounce the stream - └── when the recipient is a contract - ├── when the recipient does not implement the hook + └── given the recipient is a contract + ├── given the recipient does not implement the hook │ ├── it should renounce the stream │ ├── it should call the recipient hook │ └── it should ignore the revert - └── when the recipient implements the hook + └── given the recipient implements the hook ├── when the recipient reverts │ ├── it should renounce the stream │ ├── it should call the recipient hook diff --git a/test/integration/concrete/lockup/status-of/statusOf.t.sol b/test/integration/concrete/lockup/status-of/statusOf.t.sol index 139ec4195..55785fa45 100644 --- a/test/integration/concrete/lockup/status-of/statusOf.t.sol +++ b/test/integration/concrete/lockup/status-of/statusOf.t.sol @@ -12,18 +12,18 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.statusOf(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_StatusOf_AssetsFullyWithdrawn() external whenNotNull { + function test_StatusOf_AssetsFullyWithdrawn() external givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); Lockup.Status actualStatus = lockup.statusOf(defaultStreamId); @@ -31,11 +31,11 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup assertEq(actualStatus, expectedStatus); } - modifier whenAssetsNotFullyWithdrawn() { + modifier givenAssetsNotFullyWithdrawn() { _; } - function test_StatusOf_StreamCanceled() external whenNotNull whenAssetsNotFullyWithdrawn { + function test_StatusOf_StreamCanceled() external givenNotNull givenAssetsNotFullyWithdrawn { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); Lockup.Status actualStatus = lockup.statusOf(defaultStreamId); @@ -43,15 +43,15 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup assertEq(actualStatus, expectedStatus); } - modifier whenStreamNotCanceled() { + modifier givenStreamNotCanceled() { _; } function test_StatusOf_StartTimeInTheFuture() external - whenNotNull - whenAssetsNotFullyWithdrawn - whenStreamNotCanceled + givenNotNull + givenAssetsNotFullyWithdrawn + givenStreamNotCanceled { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); Lockup.Status actualStatus = lockup.statusOf(defaultStreamId); @@ -65,9 +65,9 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup function test_StatusOf_RefundableAmountNotZero() external - whenNotNull - whenAssetsNotFullyWithdrawn - whenStreamNotCanceled + givenNotNull + givenAssetsNotFullyWithdrawn + givenStreamNotCanceled whenStartTimeNotInTheFuture { vm.warp({ timestamp: defaults.END_TIME() }); @@ -76,17 +76,17 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup assertEq(actualStatus, expectedStatus); } - modifier whenRefundableAmountNotZero() { + modifier givenRefundableAmountNotZero() { _; } function test_StatusOf() external - whenNotNull - whenAssetsNotFullyWithdrawn - whenStreamNotCanceled + givenNotNull + givenAssetsNotFullyWithdrawn + givenStreamNotCanceled whenStartTimeNotInTheFuture - whenRefundableAmountNotZero + givenRefundableAmountNotZero { vm.warp({ timestamp: defaults.START_TIME() + 1 seconds }); Lockup.Status actualStatus = lockup.statusOf(defaultStreamId); diff --git a/test/integration/concrete/lockup/status-of/statusOf.tree b/test/integration/concrete/lockup/status-of/statusOf.tree index 80a6a8e6b..1910d7796 100644 --- a/test/integration/concrete/lockup/status-of/statusOf.tree +++ b/test/integration/concrete/lockup/status-of/statusOf.tree @@ -1,17 +1,17 @@ statusOf.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when assets have been fully withdrawn +└── given the id does not reference a null stream + ├── given assets have been fully withdrawn │ └── it should return DEPLETED - └── when assets have not been fully withdrawn - ├── when the stream has been canceled + └── given assets have not been fully withdrawn + ├── given the stream has been canceled │ └── it should return CANCELED - └── when the stream has not been canceled + └── given the stream has not been canceled ├── when the start time is in the future │ └── it should return PENDING └── when the start time is not in the future - ├── when the refundable amount is zero + ├── given the refundable amount is zero │ └── it should return SETTLED - └── when the refundable amount is not zero + └── given the refundable amount is not zero └── it should return STREAMING diff --git a/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.t.sol b/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.t.sol index ed7ae64d0..caaa72956 100644 --- a/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.t.sol +++ b/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.t.sol @@ -14,7 +14,7 @@ abstract contract StreamedAmountOf_Integration_Concrete_Test is StreamedAmountOf_Integration_Shared_Test.setUp(); } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.streamedAmountOf(nullStreamId); @@ -22,8 +22,8 @@ abstract contract StreamedAmountOf_Integration_Concrete_Test is function test_StreamedAmountOf_StreamHasBeenCanceled_StatusCanceled() external - whenNotNull - whenStreamHasBeenCanceled + givenNotNull + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -35,8 +35,8 @@ abstract contract StreamedAmountOf_Integration_Concrete_Test is /// @dev This test warps a second time to ensure that {streamedAmountOf} ignores the current time. function test_StreamedAmountOf_StreamHasBeenCanceled_StatusDepleted() external - whenNotNull - whenStreamHasBeenCanceled + givenNotNull + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -47,21 +47,21 @@ abstract contract StreamedAmountOf_Integration_Concrete_Test is assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount"); } - function test_StreamedAmountOf_StatusPending() external whenNotNull whenStreamHasNotBeenCanceled { + function test_StreamedAmountOf_StatusPending() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); uint128 actualStreamedAmount = lockup.streamedAmountOf(defaultStreamId); uint128 expectedStreamedAmount = 0; assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount"); } - function test_StreamedAmountOf_StatusSettled() external whenNotNull whenStreamHasNotBeenCanceled { + function test_StreamedAmountOf_StatusSettled() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); uint128 actualStreamedAmount = lockup.streamedAmountOf(defaultStreamId); uint128 expectedStreamedAmount = defaults.DEPOSIT_AMOUNT(); assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount"); } - function test_StreamedAmountOf_StatusDepleted() external whenNotNull whenStreamHasNotBeenCanceled { + function test_StreamedAmountOf_StatusDepleted() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); uint128 actualStreamedAmount = lockup.streamedAmountOf(defaultStreamId); diff --git a/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.tree b/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.tree index 5f3aedbd1..dbc0970ab 100644 --- a/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.tree +++ b/test/integration/concrete/lockup/streamed-amount-of/streamedAmountOf.tree @@ -1,16 +1,16 @@ streamedAmountOf.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream has been canceled - │ ├── when the stream's status is "CANCELED" +└── given the id does not reference a null stream + ├── given the stream has been canceled + │ ├── given the stream's status is "CANCELED" │ │ └── it should return the correct streamed amount - │ └── when the stream's status is "DEPLETED" + │ └── given the stream's status is "DEPLETED" │ └── it should return the correct streamed amount - └── when the stream has not been canceled - ├── when the stream's status is "PENDING" + └── given the stream has not been canceled + ├── given the stream's status is "PENDING" │ └── it should return zero - ├── when the stream's status is "SETTLED" + ├── given the stream's status is "SETTLED" │ └── it should return the deposited amount - └── when the stream's status is "DEPLETED" + └── given the stream's status is "DEPLETED" └── it should return the correct streamed amount diff --git a/test/integration/concrete/lockup/was-canceled/wasCanceled.t.sol b/test/integration/concrete/lockup/was-canceled/wasCanceled.t.sol index e2a2c6d56..3eea3c362 100644 --- a/test/integration/concrete/lockup/was-canceled/wasCanceled.t.sol +++ b/test/integration/concrete/lockup/was-canceled/wasCanceled.t.sol @@ -11,28 +11,28 @@ abstract contract WasCanceled_Integration_Concrete_Test is Integration_Test, Loc function setUp() public virtual override(Integration_Test, Lockup_Integration_Shared_Test) { } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.wasCanceled(nullStreamId); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - function test_WasCanceled_StreamNotCanceled() external whenNotNull { + function test_WasCanceled_StreamNotCanceled() external givenNotNull { bool wasCanceled = lockup.wasCanceled(defaultStreamId); assertFalse(wasCanceled, "wasCanceled"); } - modifier whenStreamCanceled() { + modifier givenStreamCanceled() { lockup.cancel(defaultStreamId); _; } - function test_WasCanceled() external whenNotNull whenStreamCanceled { + function test_WasCanceled() external givenNotNull givenStreamCanceled { bool wasCanceled = lockup.wasCanceled(defaultStreamId); assertTrue(wasCanceled, "wasCanceled"); } diff --git a/test/integration/concrete/lockup/was-canceled/wasCanceled.tree b/test/integration/concrete/lockup/was-canceled/wasCanceled.tree index 805f4fa89..5dd4e1e3a 100644 --- a/test/integration/concrete/lockup/was-canceled/wasCanceled.tree +++ b/test/integration/concrete/lockup/was-canceled/wasCanceled.tree @@ -1,8 +1,8 @@ wasCanceled.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream was not canceled +└── given the id does not reference a null stream + ├── given the stream was not canceled │ └── it should return false - └── when the stream was canceled + └── given the stream was canceled └── it should return true diff --git a/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol b/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol index fac7dd2a2..3d6ad1339 100644 --- a/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol +++ b/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.t.sol @@ -21,13 +21,13 @@ abstract contract WithdrawMaxAndTransfer_Integration_Concrete_Test is expectRevertDueToDelegateCall(success, returnData); } - function test_RevertWhen_Null() external whenNotDelegateCalled { + function test_RevertGiven_Null() external whenNotDelegateCalled { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.withdrawMaxAndTransfer({ streamId: nullStreamId, newRecipient: users.recipient }); } - function test_RevertWhen_CallerNotCurrentRecipient() external whenNotDelegateCalled whenNotNull { + function test_RevertWhen_CallerNotCurrentRecipient() external whenNotDelegateCalled givenNotNull { // Make Eve the caller in this test. changePrank({ msgSender: users.eve }); @@ -38,7 +38,7 @@ abstract contract WithdrawMaxAndTransfer_Integration_Concrete_Test is lockup.withdrawMaxAndTransfer({ streamId: defaultStreamId, newRecipient: users.eve }); } - function test_RevertWhen_NFTBurned() external whenNotDelegateCalled whenNotNull whenCallerCurrentRecipient { + function test_RevertGiven_NFTBurned() external whenNotDelegateCalled givenNotNull whenCallerCurrentRecipient { // Deplete the stream. vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); @@ -56,9 +56,9 @@ abstract contract WithdrawMaxAndTransfer_Integration_Concrete_Test is function test_WithdrawMaxAndTransfer_WithdrawableAmountZero() external whenNotDelegateCalled - whenNotNull + givenNotNull whenCallerCurrentRecipient - whenNFTNotBurned + givenNFTNotBurned { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); @@ -68,10 +68,10 @@ abstract contract WithdrawMaxAndTransfer_Integration_Concrete_Test is function test_WithdrawMaxAndTransfer() external whenNotDelegateCalled - whenNotNull + givenNotNull whenCallerCurrentRecipient - whenNFTNotBurned - whenWithdrawableAmountNotZero + givenNFTNotBurned + givenWithdrawableAmountNotZero { // Simulate the passage of time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); diff --git a/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.tree b/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.tree index ebcfd113f..166704694 100644 --- a/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.tree +++ b/test/integration/concrete/lockup/withdraw-max-and-transfer/withdrawMaxAndTransfer.tree @@ -2,18 +2,18 @@ withdrawMaxAndTransfer.t.sol ├── when delegate called │ └── it should revert └── when not delegate called - ├── when the id references a null stream + ├── given the id references a null stream │ └── it should revert - └── when the id does not reference a null stream + └── given the id does not reference a null stream ├── when the caller is not the current recipient │ └── it should revert └── when the caller is the current recipient - ├── when the NFT has been burned + ├── given the NFT has been burned │ └── it should revert - └── when the NFT has not been burned - ├── when the withdrawable amount is zero + └── given the NFT has not been burned + ├── given the withdrawable amount is zero │ └── it should skip the withdrawal - └── when the withdrawable amount is not zero + └── given the withdrawable amount is not zero ├── it should make the max withdrawal ├── it should update the withdrawn amount ├── it should transfer the NFT diff --git a/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.t.sol b/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.t.sol index 66261d042..25eb3b761 100644 --- a/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.t.sol +++ b/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.t.sol @@ -50,7 +50,12 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is _; } - function test_RevertWhen_OnlyNull() external whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero { + function test_RevertGiven_OnlyNull() + external + whenNotDelegateCalled + whenArrayCountsAreEqual + whenArrayCountsNotZero + { uint256 nullStreamId = 1729; uint128 withdrawAmount = defaults.WITHDRAW_AMOUNT(); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); @@ -61,7 +66,12 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is }); } - function test_RevertWhen_SomeNull() external whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero { + function test_RevertGiven_SomeNull() + external + whenNotDelegateCalled + whenArrayCountsAreEqual + whenArrayCountsNotZero + { uint256 nullStreamId = 1729; uint256[] memory streamIds = Solarray.uint256s(testStreamIds[0], testStreamIds[1], nullStreamId); @@ -75,12 +85,12 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is lockup.withdrawMultiple({ streamIds: streamIds, to: users.recipient, amounts: testAmounts }); } - function test_RevertWhen_AllStatusesDepleted() + function test_RevertGiven_AllStatusesDepleted() external whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull + givenNoNull { uint256[] memory streamIds = Solarray.uint256s(testStreamIds[0]); uint128[] memory amounts = Solarray.uint128s(defaults.WITHDRAW_AMOUNT()); @@ -98,12 +108,12 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is lockup.withdrawMultiple({ streamIds: streamIds, to: users.recipient, amounts: amounts }); } - function test_RevertWhen_SomeStatusesDepleted() + function test_RevertGiven_SomeStatusesDepleted() external whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull + givenNoNull { // Simulate the passage of time. vm.warp({ timestamp: defaults.END_TIME() }); @@ -123,8 +133,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerUnauthorized { // Make Eve the caller in this test. @@ -142,8 +152,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerUnauthorized { // Transfer all streams to Alice. @@ -164,8 +174,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerUnauthorized { // Create a stream with Eve as the stream's recipient. @@ -190,8 +200,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerUnauthorized { // Transfer one of the streams to Eve. @@ -213,8 +223,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerAuthorizedAllStreams { if (caller == users.sender) { @@ -229,8 +239,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerAuthorizedAllStreams whenToNonZeroAddress { @@ -248,8 +258,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerAuthorizedAllStreams whenToNonZeroAddress whenNoAmountZero @@ -273,8 +283,8 @@ abstract contract WithdrawMultiple_Integration_Concrete_Test is whenNotDelegateCalled whenArrayCountsAreEqual whenArrayCountsNotZero - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerAuthorizedAllStreams whenToNonZeroAddress whenNoAmountZero diff --git a/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.tree b/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.tree index a2d55d645..52ca2f9e7 100644 --- a/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.tree +++ b/test/integration/concrete/lockup/withdraw-multiple/withdrawMultiple.tree @@ -8,16 +8,16 @@ withdrawMultiple.t.sol ├── when the array counts are zero │ └── it should do nothing └── when the array counts are not zero - ├── when the stream ids array references only null streams + ├── given the stream ids array references only null streams │ └── it should revert - ├── when the stream ids array references some null streams + ├── given the stream ids array references some null streams │ └── it should revert - └── when the stream ids array references only non-null streams - ├── when all streams' statuses are "DEPLETED" + └── given the stream ids array references only non-null streams + ├── given all streams' statuses are "DEPLETED" │ └── it should revert - ├── when some streams' statuses are "DEPLETED" + ├── given some streams' statuses are "DEPLETED" │ └── it should revert - └── when no stream's status is "DEPLETED" + └── given no stream's status is "DEPLETED" ├── when the caller is unauthorized for all streams │ ├── when the caller is a malicious third party │ │ └── it should revert diff --git a/test/integration/concrete/lockup/withdraw/withdraw.t.sol b/test/integration/concrete/lockup/withdraw/withdraw.t.sol index 3e0120fd9..c79dbe068 100644 --- a/test/integration/concrete/lockup/withdraw/withdraw.t.sol +++ b/test/integration/concrete/lockup/withdraw/withdraw.t.sol @@ -23,14 +23,14 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr expectRevertDueToDelegateCall(success, returnData); } - function test_RevertWhen_Null() external whenNotDelegateCalled { + function test_RevertGiven_Null() external whenNotDelegateCalled { uint256 nullStreamId = 1729; uint128 withdrawAmount = defaults.WITHDRAW_AMOUNT(); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.withdraw({ streamId: nullStreamId, to: users.recipient, amount: withdrawAmount }); } - function test_RevertWhen_StreamDepleted() external whenNotDelegateCalled whenNotNull { + function test_RevertGiven_StreamDepleted() external whenNotDelegateCalled givenNotNull { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); @@ -42,8 +42,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_RevertWhen_CallerUnauthorized_Sender() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerUnauthorized { // Make the Sender the caller in this test. @@ -62,8 +62,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_RevertWhen_CallerUnauthorized_MaliciousThirdParty() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerUnauthorized { // Make Eve the caller in this test. @@ -77,7 +77,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr lockup.withdraw({ streamId: defaultStreamId, to: users.recipient, amount: withdrawAmount }); } - function test_RevertWhen_FormerRecipient() external whenNotDelegateCalled whenNotNull whenStreamNotDepleted { + function test_RevertWhen_FormerRecipient() external whenNotDelegateCalled givenNotNull givenStreamNotDepleted { // Transfer the stream to Alice. lockup.transferFrom(users.recipient, users.alice, defaultStreamId); @@ -92,8 +92,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_RevertWhen_ToZeroAddress() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized { uint128 withdrawAmount = defaults.WITHDRAW_AMOUNT(); @@ -104,8 +104,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_RevertWhen_WithdrawAmountZero() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress { @@ -116,8 +116,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_RevertWhen_Overdraw() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -138,8 +138,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw_CallerRecipient() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -163,8 +163,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw_CallerApprovedOperator() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -196,8 +196,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw_EndTimeNotInTheFuture() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -234,16 +234,16 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw_StreamHasBeenCanceled() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender whenEndTimeInTheFuture - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert whenNoRecipientReentrancy { @@ -278,8 +278,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw_RecipientNotContract() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -312,15 +312,15 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr assertEq(actualWithdrawnAmount, expectedWithdrawnAmount, "withdrawnAmount"); } - modifier whenRecipientContract() { + modifier givenRecipientContract() { _; } function test_Withdraw_RecipientDoesNotImplementHook() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -328,7 +328,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenCallerSender whenEndTimeInTheFuture whenStreamHasNotBeenCanceled - whenRecipientContract + givenRecipientContract { // Create the stream with a no-op contract as the stream's recipient. uint256 streamId = createDefaultStreamWithRecipient(address(noop)); @@ -356,15 +356,15 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr assertEq(actualWithdrawnAmount, expectedWithdrawnAmount, "withdrawnAmount"); } - modifier whenRecipientImplementsHook() { + modifier givenRecipientImplementsHook() { _; } function test_Withdraw_RecipientReverts() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -372,8 +372,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenCallerSender whenEndTimeInTheFuture whenStreamHasNotBeenCanceled - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook { // Create the stream with a reverting contract as the stream's recipient. uint256 streamId = createDefaultStreamWithRecipient(address(revertingRecipient)); @@ -408,8 +408,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw_RecipientReentrancy() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -417,8 +417,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenCallerSender whenEndTimeInTheFuture whenStreamHasNotBeenCanceled - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert { // Create the stream with a reentrant contract as the stream's recipient. @@ -457,8 +457,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr function test_Withdraw() external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -466,8 +466,8 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenCallerSender whenEndTimeInTheFuture whenStreamHasNotBeenCanceled - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert whenNoRecipientReentrancy { diff --git a/test/integration/concrete/lockup/withdraw/withdraw.tree b/test/integration/concrete/lockup/withdraw/withdraw.tree index 30f46c698..b8e148431 100644 --- a/test/integration/concrete/lockup/withdraw/withdraw.tree +++ b/test/integration/concrete/lockup/withdraw/withdraw.tree @@ -2,12 +2,12 @@ withdraw.t.sol ├── when delegate called │ └── it should revert └── when not delegate called - ├── when the id references a null stream + ├── given the id references a null stream │ └── it should revert - └── when the id does not reference a null stream - ├── when the stream's status is "DEPLETED" + └── given the id does not reference a null stream + ├── given the stream's status is "DEPLETED" │ └── it should revert - └── when the stream's status is not "DEPLETED" + └── given the stream's status is not "DEPLETED" ├── when the caller is unauthorized │ ├── when the caller is the sender │ │ └── it should revert @@ -37,24 +37,24 @@ withdraw.t.sol │ ├── it should mark the stream as depleted │ └── it should make the stream not cancelable └── when the end time is in the future - ├── when the stream has been canceled + ├── given the stream has been canceled │ ├── it should make the withdrawal │ ├── it should mark the stream as depleted │ ├── it should update the withdrawn amount │ ├── it should call the recipient hook │ ├── it should emit a {MetadataUpdate} event │ └── it should emit a {WithdrawFromLockupStream} event - └── when the stream has not been canceled - ├── when the recipient is not a contract + └── given the stream has not been canceled + ├── given the recipient is not a contract │ └── it should make the withdrawal │ └── it should update the withdrawn amount - └── when the recipient is a contract - ├── when the recipient does not implement the hook + └── given the recipient is a contract + ├── given the recipient does not implement the hook │ ├── it should make the withdrawal │ ├── it should update the withdrawn amount │ ├── it should call the recipient hook │ └── it should ignore the revert - └── when the recipient implements the hook + └── given the recipient implements the hook ├── when the recipient reverts │ ├── it should make the withdrawal │ ├── it should update the withdrawn amount diff --git a/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.t.sol b/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.t.sol index 41ff2dfef..5f38eceb8 100644 --- a/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.t.sol +++ b/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.t.sol @@ -14,7 +14,7 @@ abstract contract WithdrawableAmountOf_Integration_Concrete_Test is WithdrawableAmountOf_Integration_Shared_Test.setUp(); } - function test_RevertWhen_Null() external { + function test_RevertGiven_Null() external { uint256 nullStreamId = 1729; vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2Lockup_Null.selector, nullStreamId)); lockup.withdrawableAmountOf(nullStreamId); @@ -22,8 +22,8 @@ abstract contract WithdrawableAmountOf_Integration_Concrete_Test is function test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusCanceled() external - whenNotNull - whenStreamHasBeenCanceled + givenNotNull + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -35,8 +35,8 @@ abstract contract WithdrawableAmountOf_Integration_Concrete_Test is /// @dev This test warps a second time to ensure that {withdrawableAmountOf} ignores the current time. function test_WithdrawableAmountOf_StreamHasBeenCanceled_StatusDepleted() external - whenNotNull - whenStreamHasBeenCanceled + givenNotNull + givenStreamHasBeenCanceled { vm.warp({ timestamp: defaults.CLIFF_TIME() }); lockup.cancel(defaultStreamId); @@ -47,21 +47,21 @@ abstract contract WithdrawableAmountOf_Integration_Concrete_Test is assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - function test_WithdrawableAmountOf_StatusPending() external whenNotNull whenStreamHasNotBeenCanceled { + function test_WithdrawableAmountOf_StatusPending() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: getBlockTimestamp() - 1 seconds }); uint128 actualWithdrawableAmount = lockup.withdrawableAmountOf(defaultStreamId); uint128 expectedWithdrawableAmount = 0; assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - function test_WithdrawableAmountOf_StatusSettled() external whenNotNull whenStreamHasNotBeenCanceled { + function test_WithdrawableAmountOf_StatusSettled() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); uint128 actualWithdrawableAmount = lockup.withdrawableAmountOf(defaultStreamId); uint128 expectedWithdrawableAmount = defaults.DEPOSIT_AMOUNT(); assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - function test_WithdrawableAmountOf_StatusDepleted() external whenNotNull whenStreamHasNotBeenCanceled { + function test_WithdrawableAmountOf_StatusDepleted() external givenNotNull givenStreamHasNotBeenCanceled { vm.warp({ timestamp: defaults.END_TIME() }); lockup.withdrawMax({ streamId: defaultStreamId, to: users.recipient }); uint128 actualWithdrawableAmount = lockup.withdrawableAmountOf(defaultStreamId); diff --git a/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.tree b/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.tree index 2e47de752..27c4896ef 100644 --- a/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.tree +++ b/test/integration/concrete/lockup/withdrawable-amount-of/withdrawableAmountOf.tree @@ -1,16 +1,16 @@ withdrawableAmountOf.t.sol -├── when the id references a null stream +├── given the id references a null stream │ └── it should revert -└── when the id does not reference a null stream - ├── when the stream has been canceled - │ ├── when the stream's status is "CANCELED" +└── given the id does not reference a null stream + ├── given the stream has been canceled + │ ├── given the stream's status is "CANCELED" │ │ └── it should return the correct withdrawable amount - │ └── when the stream's status is "DEPLETED" + │ └── given the stream's status is "DEPLETED" │ └── it should return zero - └── when the stream has not been canceled - ├── when the stream's status is "PENDING" + └── given the stream has not been canceled + ├── given the stream's status is "PENDING" │ └── it should return zero - ├── when the stream's status is "SETTLED" + ├── given the stream's status is "SETTLED" │ └── it should return the correct withdrawable amount - └── when the stream's status is "DEPLETED" + └── given the stream's status is "DEPLETED" └── it should return zero diff --git a/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.t.sol b/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.t.sol index e0a4e6c04..16051f57d 100644 --- a/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.t.sol +++ b/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.t.sol @@ -8,23 +8,23 @@ import { Errors } from "src/libraries/Errors.sol"; import { NFTDescriptor_Integration_Concrete_Test } from "../NFTDescriptor.t.sol"; contract MapSymbol_Integration_Concrete_Test is NFTDescriptor_Integration_Concrete_Test { - function test_RevertWhen_UnknownNFT() external { + function test_RevertGiven_UnknownNFT() external { ERC721 nft = new ERC721("Foo NFT", "FOO"); vm.expectRevert(abi.encodeWithSelector(Errors.SablierV2NFTDescriptor_UnknownNFT.selector, nft, "FOO")); nftDescriptorMock.mapSymbol_(nft); } - modifier whenKnownNFT() { + modifier givenKnownNFT() { _; } - function test_MapSymbol_LockupDynamic() external { + function test_MapSymbol_LockupDynamic() external givenKnownNFT { string memory actualStreamingModel = nftDescriptorMock.mapSymbol_(lockupDynamic); string memory expectedStreamingModel = "Lockup Dynamic"; assertEq(actualStreamingModel, expectedStreamingModel, "streamingModel"); } - function test_MapSymbol_LockupLinear() external { + function test_MapSymbol_LockupLinear() external givenKnownNFT { string memory actualStreamingModel = nftDescriptorMock.mapSymbol_(lockupLinear); string memory expectedStreamingModel = "Lockup Linear"; assertEq(actualStreamingModel, expectedStreamingModel, "streamingModel"); diff --git a/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.tree b/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.tree index 180888a4f..dab781841 100644 --- a/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.tree +++ b/test/integration/concrete/nft-descriptor/map-symbol/mapSymbol.tree @@ -1,5 +1,8 @@ mapSymbol.t.sol -├── when the NFT contract is unknown -│ └── it should revert -└── when the NFT contract is known - └── it should map the ERC-721 symbol to a streaming model +├── given the NFT contract is unknown +│ └── it should revert +└── given the NFT contract is known + ├── when the NFT contract is LockupDynamic + │ └── it should map the ERC-721 symbol to Lockup Dynamic + └── when the NFT contract is LockupLinear + └── it should map the ERC-721 symbol to Lockup Linear diff --git a/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.t.sol b/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.t.sol index a289bcda6..e22d505e9 100644 --- a/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.t.sol +++ b/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.t.sol @@ -17,11 +17,11 @@ contract SafeAssetDecimals_Integration_Concrete_Test is NFTDescriptor_Integratio assertEq(actualDecimals, expectedDecimals, "decimals"); } - modifier whenNotReverted() { + modifier whenAssetDecimalsDefined() { _; } - function test_SafeAssetDecimals() external whenNotReverted { + function test_SafeAssetDecimals() external whenAssetDecimalsDefined { uint8 actualDecimals = nftDescriptorMock.safeAssetDecimals_(address(dai)); uint8 expectedDecimals = dai.decimals(); assertEq(actualDecimals, expectedDecimals, "decimals"); diff --git a/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.tree b/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.tree index dcd0c000e..704d042ac 100644 --- a/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.tree +++ b/test/integration/concrete/nft-descriptor/safe-asset-decimals/safeAssetDecimals.tree @@ -1,5 +1,8 @@ safeAssetDecimals.t.sol -├── when the call reverts -│ └── it should return 0 -└── when the call does not revert - └── it should return the correct value +├── when the asset's decimals are not defined +│ ├── when the asset is an EOA +│ │ └── it should return 0 +│ └── when the asset is not an ERC-20 contract +│ └── it should return 0 +└── when the asset's decimals are defined + └── it should return the correct decimal value diff --git a/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.t.sol b/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.t.sol index bc6ac2737..e8079a2c4 100644 --- a/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.t.sol +++ b/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.t.sol @@ -7,13 +7,6 @@ import { ERC20Bytes32 } from "../../../../mocks/erc20/ERC20Bytes32.sol"; import { NFTDescriptor_Integration_Concrete_Test } from "../NFTDescriptor.t.sol"; contract SafeAssetSymbol_Integration_Concrete_Test is NFTDescriptor_Integration_Concrete_Test { - function test_SafeAssetSymbol_Bytes32() external { - ERC20Bytes32 asset = new ERC20Bytes32(); - string memory actualSymbol = nftDescriptorMock.safeAssetSymbol_(address(asset)); - string memory expectedSymbol = "ERC20"; - assertEq(actualSymbol, expectedSymbol, "symbol"); - } - function test_SafeAssetSymbol_EOA() external { address eoa = vm.addr({ privateKey: 1 }); string memory actualSymbol = nftDescriptorMock.safeAssetSymbol_(address(eoa)); @@ -27,11 +20,22 @@ contract SafeAssetSymbol_Integration_Concrete_Test is NFTDescriptor_Integration_ assertEq(actualSymbol, expectedSymbol, "symbol"); } - modifier whenNotReverted() { + modifier whenERC20Contract() { + _; + } + + function test_SafeAssetSymbol_Bytes32() external whenERC20Contract { + ERC20Bytes32 asset = new ERC20Bytes32(); + string memory actualSymbol = nftDescriptorMock.safeAssetSymbol_(address(asset)); + string memory expectedSymbol = "ERC20"; + assertEq(actualSymbol, expectedSymbol, "symbol"); + } + + modifier givenSymbolString() { _; } - function test_SafeAssetSymbol_LongSymbol() external whenNotReverted { + function test_SafeAssetSymbol_LongSymbol() external whenERC20Contract givenSymbolString { ERC20 asset = new ERC20({ name_: "Token", symbol_: "This symbol is has more than 30 characters and it should be ignored" }); string memory actualSymbol = nftDescriptorMock.safeAssetSymbol_(address(asset)); @@ -39,11 +43,11 @@ contract SafeAssetSymbol_Integration_Concrete_Test is NFTDescriptor_Integration_ assertEq(actualSymbol, expectedSymbol, "symbol"); } - modifier whenSymbolNotLong() { + modifier givenSymbolNotLong() { _; } - function test_SafeAssetSymbol() external whenNotReverted whenSymbolNotLong { + function test_SafeAssetSymbol() external whenERC20Contract givenSymbolString givenSymbolNotLong { string memory actualSymbol = nftDescriptorMock.safeAssetSymbol_(address(dai)); string memory expectedSymbol = dai.symbol(); assertEq(actualSymbol, expectedSymbol, "symbol"); diff --git a/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.tree b/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.tree index de580146a..792667a10 100644 --- a/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.tree +++ b/test/integration/concrete/nft-descriptor/safe-asset-symbol/safeAssetSymbol.tree @@ -1,8 +1,11 @@ safeAssetSymbol.t.sol -├── when the call reverts +├── when the asset is not an ERC-20 contract │ └── it should return a hard-coded value -└── when the call does not revert - ├── when the symbol is long +└── when the asset is an ERC-20 contract + ├── given the symbol is returned as bytes32 │ └── it should return a hard-coded value - └── when the symbol is not long - └── it should return the correct value + └── given the symbol is returned as string + ├── given the symbol is longer than 30 characters + │ └── it should return a hard-coded values + └── given the symbol is not longer than 30 characters + └── it should return the correct symbol value diff --git a/test/integration/fuzz/comptroller/setFlashFee.t.sol b/test/integration/fuzz/comptroller/setFlashFee.t.sol index 328bffa53..e8b27e0f0 100644 --- a/test/integration/fuzz/comptroller/setFlashFee.t.sol +++ b/test/integration/fuzz/comptroller/setFlashFee.t.sol @@ -6,11 +6,11 @@ import { UD60x18, ZERO } from "@prb/math/src/UD60x18.sol"; import { Integration_Test } from "../../Integration.t.sol"; contract SetFlashFee_Integration_Fuzz_Test is Integration_Test { - modifier whenCallerAdmin() { + modifier givenCallerAdmin() { _; } - function testFuzz_SetFlashFee(UD60x18 newFlashFee) external whenCallerAdmin { + function testFuzz_SetFlashFee(UD60x18 newFlashFee) external givenCallerAdmin { newFlashFee = _bound(newFlashFee, 0, MAX_FEE); // Expect the relevant event to be emitted. diff --git a/test/integration/fuzz/comptroller/setProtocolFee.t.sol b/test/integration/fuzz/comptroller/setProtocolFee.t.sol index 1e68dee2a..0db99800c 100644 --- a/test/integration/fuzz/comptroller/setProtocolFee.t.sol +++ b/test/integration/fuzz/comptroller/setProtocolFee.t.sol @@ -6,11 +6,11 @@ import { UD60x18, ZERO } from "@prb/math/src/UD60x18.sol"; import { Integration_Test } from "../../Integration.t.sol"; contract SetProtocolFee_Integration_Fuzz_Test is Integration_Test { - modifier whenCallerAdmin() { + modifier givenCallerAdmin() { _; } - function testFuzz_SetProtocolFee(UD60x18 newProtocolFee) external whenCallerAdmin { + function testFuzz_SetProtocolFee(UD60x18 newProtocolFee) external givenCallerAdmin { newProtocolFee = _bound(newProtocolFee, 1, MAX_FEE); // Expect the relevant event to be emitted. diff --git a/test/integration/fuzz/flash-loan/flashFee.t.sol b/test/integration/fuzz/flash-loan/flashFee.t.sol index ea62eb05f..63fc9095a 100644 --- a/test/integration/fuzz/flash-loan/flashFee.t.sol +++ b/test/integration/fuzz/flash-loan/flashFee.t.sol @@ -6,7 +6,7 @@ import { UD60x18, ud } from "@prb/math/src/UD60x18.sol"; import { FlashLoan_Integration_Shared_Test } from "../../shared/flash-loan/FlashLoan.t.sol"; contract FlashFee_Integration_Fuzz_Test is FlashLoan_Integration_Shared_Test { - modifier whenAssetFlashLoanable() { + modifier givenAssetFlashLoanable() { comptroller.toggleFlashAsset(dai); _; } @@ -15,7 +15,7 @@ contract FlashFee_Integration_Fuzz_Test is FlashLoan_Integration_Shared_Test { /// /// - Multiple values for the comptroller flash fee, including zero /// - Multiple values for the flash loan amount, including zero - function testFuzz_FlashFee(UD60x18 comptrollerFlashFee, uint256 amount) external whenAssetFlashLoanable { + function testFuzz_FlashFee(UD60x18 comptrollerFlashFee, uint256 amount) external givenAssetFlashLoanable { comptrollerFlashFee = _bound(comptrollerFlashFee, 0, MAX_FEE); comptroller.setFlashFee(comptrollerFlashFee); uint256 actualFlashFee = flashLoan.flashFee({ asset: address(dai), amount: amount }); diff --git a/test/integration/fuzz/flash-loan/flashLoan.t.sol b/test/integration/fuzz/flash-loan/flashLoan.t.sol index f33584dcd..18f9b8f27 100644 --- a/test/integration/fuzz/flash-loan/flashLoan.t.sol +++ b/test/integration/fuzz/flash-loan/flashLoan.t.sol @@ -28,7 +28,7 @@ contract FlashLoanFunction_Integration_Fuzz_Test is FlashLoanFunction_Integratio external whenNotDelegateCalled whenAmountNotTooHigh - whenAssetFlashLoanable + givenAssetFlashLoanable { // Bound the flash fee so that the calculated fee ends up being greater than 2^128. flashFee = _bound(flashFee, ud(1.1e18), ud(10e18)); @@ -58,7 +58,7 @@ contract FlashLoanFunction_Integration_Fuzz_Test is FlashLoanFunction_Integratio external whenNotDelegateCalled whenAmountNotTooHigh - whenAssetFlashLoanable + givenAssetFlashLoanable whenCalculatedFeeNotTooHigh whenBorrowDoesNotFail whenNoReentrancy diff --git a/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol b/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol index 9a83396dd..5afbd58d5 100644 --- a/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol +++ b/test/integration/fuzz/flash-loan/maxFlashLoan.t.sol @@ -4,12 +4,12 @@ pragma solidity >=0.8.19 <0.9.0; import { FlashLoan_Integration_Shared_Test } from "../../shared/flash-loan/FlashLoan.t.sol"; contract MaxFlashLoan_Integration_Fuzz_Test is FlashLoan_Integration_Shared_Test { - modifier whenAssetFlashLoanable() { + modifier givenAssetFlashLoanable() { comptroller.toggleFlashAsset(dai); _; } - function testFuzz_MaxFlashLoan(uint256 dealAmount) external whenAssetFlashLoanable { + function testFuzz_MaxFlashLoan(uint256 dealAmount) external givenAssetFlashLoanable { deal({ token: address(dai), to: address(flashLoan), give: dealAmount }); uint256 actualAmount = flashLoan.maxFlashLoan(address(dai)); uint256 expectedAmount = dealAmount; diff --git a/test/integration/fuzz/lockup-dynamic/createWithMilestones.t.sol b/test/integration/fuzz/lockup-dynamic/createWithMilestones.t.sol index ea733aa7f..576e55e01 100644 --- a/test/integration/fuzz/lockup-dynamic/createWithMilestones.t.sol +++ b/test/integration/fuzz/lockup-dynamic/createWithMilestones.t.sol @@ -167,7 +167,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Fuzz_Test is whenSegmentMilestonesOrdered whenEndTimeInTheFuture whenDepositAmountEqualToSegmentAmountsSum - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh { vm.assume(broker.account != address(0)); broker.fee = _bound(broker.fee, MAX_FEE + ud(1), MAX_UD60x18); @@ -217,7 +217,7 @@ contract CreateWithMilestones_LockupDynamic_Integration_Fuzz_Test is whenSegmentMilestonesOrdered whenEndTimeInTheFuture whenDepositAmountEqualToSegmentAmountsSum - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh whenAssetContract whenAssetERC20 diff --git a/test/integration/fuzz/lockup-dynamic/streamedAmountOf.t.sol b/test/integration/fuzz/lockup-dynamic/streamedAmountOf.t.sol index 4aa326eec..ac02bb03a 100644 --- a/test/integration/fuzz/lockup-dynamic/streamedAmountOf.t.sol +++ b/test/integration/fuzz/lockup-dynamic/streamedAmountOf.t.sol @@ -37,8 +37,8 @@ contract StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test is uint40 timeJump ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenStartTimeInThePast { vm.assume(segment.amount != 0); @@ -69,7 +69,7 @@ contract StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test is assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount"); } - modifier whenMultipleSegments() { + modifier givenMultipleSegments() { _; } @@ -90,10 +90,10 @@ contract StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test is uint40 timeJump ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenStartTimeInThePast - whenMultipleSegments + givenMultipleSegments whenCurrentMilestoneNot1st { vm.assume(segments.length > 1); @@ -141,10 +141,10 @@ contract StreamedAmountOf_LockupDynamic_Integration_Fuzz_Test is uint40 timeWarp1 ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenStartTimeInThePast - whenMultipleSegments + givenMultipleSegments whenCurrentMilestoneNot1st { vm.assume(segments.length > 1); diff --git a/test/integration/fuzz/lockup-dynamic/withdraw.t.sol b/test/integration/fuzz/lockup-dynamic/withdraw.t.sol index 2842052f9..04177f618 100644 --- a/test/integration/fuzz/lockup-dynamic/withdraw.t.sol +++ b/test/integration/fuzz/lockup-dynamic/withdraw.t.sol @@ -43,7 +43,7 @@ contract Withdraw_LockupDynamic_Integration_Fuzz_Test is function testFuzz_Withdraw_SegmentFuzing(Params memory params) external whenNotDelegateCalled - whenNotNull + givenNotNull whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero diff --git a/test/integration/fuzz/lockup-linear/createWithRange.t.sol b/test/integration/fuzz/lockup-linear/createWithRange.t.sol index 5186a889c..cb23d3737 100644 --- a/test/integration/fuzz/lockup-linear/createWithRange.t.sol +++ b/test/integration/fuzz/lockup-linear/createWithRange.t.sol @@ -90,7 +90,7 @@ contract CreateWithRange_LockupLinear_Integration_Fuzz_Test is whenStartTimeNotGreaterThanCliffTime whenCliffTimeLessThanEndTime whenEndTimeInTheFuture - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh { vm.assume(broker.account != address(0)); broker.fee = _bound(broker.fee, MAX_FEE + ud(1), MAX_UD60x18); @@ -134,7 +134,7 @@ contract CreateWithRange_LockupLinear_Integration_Fuzz_Test is whenStartTimeNotGreaterThanCliffTime whenCliffTimeLessThanEndTime whenEndTimeInTheFuture - whenProtocolFeeNotTooHigh + givenProtocolFeeNotTooHigh whenBrokerFeeNotTooHigh whenAssetContract whenAssetERC20 diff --git a/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol b/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol index 96a027378..4b14624e3 100644 --- a/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol +++ b/test/integration/fuzz/lockup-linear/streamedAmountOf.t.sol @@ -29,8 +29,8 @@ contract StreamedAmountOf_LockupLinear_Integration_Fuzz_Test is function testFuzz_StreamedAmountOf_CliffTimeInTheFuture(uint40 timeJump) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled { timeJump = boundUint40(timeJump, 0, defaults.CLIFF_DURATION() - 1); vm.warp({ timestamp: defaults.START_TIME() + timeJump }); @@ -56,8 +56,8 @@ contract StreamedAmountOf_LockupLinear_Integration_Fuzz_Test is uint128 depositAmount ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenCliffTimeNotInTheFuture { vm.assume(depositAmount != 0); @@ -89,8 +89,8 @@ contract StreamedAmountOf_LockupLinear_Integration_Fuzz_Test is uint128 depositAmount ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenCliffTimeNotInTheFuture { vm.assume(depositAmount != 0); diff --git a/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol b/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol index c7d5fead6..74f111ca3 100644 --- a/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol +++ b/test/integration/fuzz/lockup-linear/withdrawableAmountOf.t.sol @@ -23,8 +23,8 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test is function testFuzz_WithdrawableAmountOf_CliffTimeInTheFuture(uint40 timeJump) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled { timeJump = boundUint40(timeJump, 0, defaults.CLIFF_DURATION() - 1); vm.warp({ timestamp: defaults.START_TIME() + timeJump }); @@ -53,8 +53,8 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test is uint128 depositAmount ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenCliffTimeNotInTheFuture { vm.assume(depositAmount != 0); @@ -79,7 +79,7 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test is assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - modifier whenPreviousWithdrawals() { + modifier givenPreviousWithdrawals() { _; } @@ -100,10 +100,10 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Fuzz_Test is uint128 withdrawAmount ) external - whenNotNull - whenStreamHasNotBeenCanceled + givenNotNull + givenStreamHasNotBeenCanceled whenCliffTimeNotInTheFuture - whenPreviousWithdrawals + givenPreviousWithdrawals { timeJump = boundUint40(timeJump, defaults.CLIFF_DURATION(), defaults.TOTAL_DURATION() * 2); depositAmount = boundUint128(depositAmount, 10_000, MAX_UINT128); diff --git a/test/integration/fuzz/lockup/cancel.t.sol b/test/integration/fuzz/lockup/cancel.t.sol index eb6126628..8387a83a3 100644 --- a/test/integration/fuzz/lockup/cancel.t.sol +++ b/test/integration/fuzz/lockup/cancel.t.sol @@ -14,10 +14,10 @@ abstract contract Cancel_Integration_Fuzz_Test is Integration_Test, Cancel_Integ function testFuzz_Cancel_StatusPending(uint256 timeJump) external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable + givenStreamCancelable { timeJump = _bound(timeJump, 1 seconds, 100 weeks); @@ -47,14 +47,14 @@ abstract contract Cancel_Integration_Fuzz_Test is Integration_Test, Cancel_Integ ) external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerSender - whenRecipientContract - whenRecipientImplementsHook + givenRecipientContract + givenRecipientImplementsHook whenRecipientDoesNotRevert whenNoRecipientReentrancy { @@ -114,14 +114,14 @@ abstract contract Cancel_Integration_Fuzz_Test is Integration_Test, Cancel_Integ ) external whenNotDelegateCalled - whenNotNull - whenStreamWarm + givenNotNull + givenStreamWarm whenCallerAuthorized - whenStreamCancelable - whenStatusStreaming + givenStreamCancelable + givenStatusStreaming whenCallerRecipient - whenSenderContract - whenSenderImplementsHook + givenSenderContract + givenSenderImplementsHook whenSenderDoesNotRevert whenNoSenderReentrancy { diff --git a/test/integration/fuzz/lockup/cancelMultiple.t.sol b/test/integration/fuzz/lockup/cancelMultiple.t.sol index 1c1ecb730..e78a71803 100644 --- a/test/integration/fuzz/lockup/cancelMultiple.t.sol +++ b/test/integration/fuzz/lockup/cancelMultiple.t.sol @@ -19,10 +19,10 @@ abstract contract CancelMultiple_Integration_Fuzz_Test is Integration_Test, Canc ) external whenNotDelegateCalled - whenNoNull - whenAllStreamsWarm + givenNoNull + givenAllStreamsWarm whenCallerAuthorizedAllStreams - whenAllStreamsCancelable + givenAllStreamsCancelable { timeJump = _bound(timeJump, 0 seconds, defaults.TOTAL_DURATION() - 1 seconds); endTime = boundUint40(endTime, defaults.END_TIME(), defaults.END_TIME() + defaults.TOTAL_DURATION()); diff --git a/test/integration/fuzz/lockup/getWithdrawnAmount.t.sol b/test/integration/fuzz/lockup/getWithdrawnAmount.t.sol index 4b4661b1d..88e7c4413 100644 --- a/test/integration/fuzz/lockup/getWithdrawnAmount.t.sol +++ b/test/integration/fuzz/lockup/getWithdrawnAmount.t.sol @@ -12,7 +12,7 @@ abstract contract GetWithdrawnAmount_Integration_Fuzz_Test is GetWithdrawnAmount_Integration_Shared_Test.setUp(); } - function testFuzz_GetWithdrawnAmount_NoPreviousWithdrawals(uint256 timeJump) external whenNotNull { + function testFuzz_GetWithdrawnAmount_NoPreviousWithdrawals(uint256 timeJump) external givenNotNull { timeJump = _bound(timeJump, 0 seconds, defaults.TOTAL_DURATION() * 2); // Simulate the passage of time. @@ -29,8 +29,8 @@ abstract contract GetWithdrawnAmount_Integration_Fuzz_Test is uint128 withdrawAmount ) external - whenNotNull - whenPreviousWithdrawals + givenNotNull + givenPreviousWithdrawals { timeJump = _bound(timeJump, defaults.CLIFF_DURATION(), defaults.TOTAL_DURATION() - 1 seconds); diff --git a/test/integration/fuzz/lockup/withdraw.t.sol b/test/integration/fuzz/lockup/withdraw.t.sol index 3bb547128..1c6255705 100644 --- a/test/integration/fuzz/lockup/withdraw.t.sol +++ b/test/integration/fuzz/lockup/withdraw.t.sol @@ -17,8 +17,8 @@ abstract contract Withdraw_Integration_Fuzz_Test is Integration_Test, Withdraw_I function testFuzz_Withdraw_CallerApprovedOperator(address to) external whenNotDelegateCalled - whenNotNull - whenStreamNotDepleted + givenNotNull + givenStreamNotDepleted whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -61,7 +61,7 @@ abstract contract Withdraw_Integration_Fuzz_Test is Integration_Test, Withdraw_I ) external whenNotDelegateCalled - whenNotNull + givenNotNull whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero @@ -127,7 +127,7 @@ abstract contract Withdraw_Integration_Fuzz_Test is Integration_Test, Withdraw_I ) external whenNotDelegateCalled - whenNotNull + givenNotNull whenCallerAuthorized whenToNonZeroAddress whenWithdrawAmountNotZero diff --git a/test/integration/fuzz/lockup/withdrawMaxAndTransfer.t.sol b/test/integration/fuzz/lockup/withdrawMaxAndTransfer.t.sol index 18524974c..7cc0f282f 100644 --- a/test/integration/fuzz/lockup/withdrawMaxAndTransfer.t.sol +++ b/test/integration/fuzz/lockup/withdrawMaxAndTransfer.t.sol @@ -22,9 +22,9 @@ abstract contract WithdrawMaxAndTransfer_Integration_Fuzz_Test is ) external whenNotDelegateCalled - whenNotNull + givenNotNull whenCallerCurrentRecipient - whenNFTNotBurned + givenNFTNotBurned { vm.assume(newRecipient != address(0)); timeJump = _bound(timeJump, 0, defaults.TOTAL_DURATION() * 2); diff --git a/test/integration/fuzz/lockup/withdrawMultiple.t.sol b/test/integration/fuzz/lockup/withdrawMultiple.t.sol index 14a2ce521..8b38c8cdd 100644 --- a/test/integration/fuzz/lockup/withdrawMultiple.t.sol +++ b/test/integration/fuzz/lockup/withdrawMultiple.t.sol @@ -24,8 +24,8 @@ abstract contract WithdrawMultiple_Integration_Fuzz_Test is external whenNotDelegateCalled whenArraysEqual - whenNoNull - whenNoDepletedStream + givenNoNull + givenNoDepletedStream whenCallerAuthorizedAllStreams whenToNonZeroAddress whenNoAmountZero diff --git a/test/integration/shared/flash-loan/flashLoanFunction.t.sol b/test/integration/shared/flash-loan/flashLoanFunction.t.sol index e3576426e..032b72d97 100644 --- a/test/integration/shared/flash-loan/flashLoanFunction.t.sol +++ b/test/integration/shared/flash-loan/flashLoanFunction.t.sol @@ -18,7 +18,7 @@ contract FlashLoanFunction_Integration_Shared_Test is FlashLoan_Integration_Shar _; } - modifier whenAssetFlashLoanable() { + modifier givenAssetFlashLoanable() { if (!comptroller.isFlashAsset(dai)) { comptroller.toggleFlashAsset(dai); } diff --git a/test/integration/shared/lockup-dynamic/createWithMilestones.t.sol b/test/integration/shared/lockup-dynamic/createWithMilestones.t.sol index c39725123..a26a14c23 100644 --- a/test/integration/shared/lockup-dynamic/createWithMilestones.t.sol +++ b/test/integration/shared/lockup-dynamic/createWithMilestones.t.sol @@ -50,7 +50,7 @@ contract CreateWithMilestones_Integration_Shared_Test is LockupDynamic_Integrati _; } - modifier whenProtocolFeeNotTooHigh() { + modifier givenProtocolFeeNotTooHigh() { _; } diff --git a/test/integration/shared/lockup-linear/createWithRange.t.sol b/test/integration/shared/lockup-linear/createWithRange.t.sol index 3a7a98771..7a7ff6780 100644 --- a/test/integration/shared/lockup-linear/createWithRange.t.sol +++ b/test/integration/shared/lockup-linear/createWithRange.t.sol @@ -34,7 +34,7 @@ abstract contract CreateWithRange_Integration_Shared_Test is LockupLinear_Integr _; } - modifier whenProtocolFeeNotTooHigh() { + modifier givenProtocolFeeNotTooHigh() { _; } diff --git a/test/integration/shared/lockup/cancel.t.sol b/test/integration/shared/lockup/cancel.t.sol index ef69ad8e3..b808ab233 100644 --- a/test/integration/shared/lockup/cancel.t.sol +++ b/test/integration/shared/lockup/cancel.t.sol @@ -15,15 +15,15 @@ abstract contract Cancel_Integration_Shared_Test is Lockup_Integration_Shared_Te _; } - modifier whenNotNull() { + modifier givenNotNull() { _; } - modifier whenStreamCold() { + modifier givenStreamCold() { _; } - modifier whenStreamWarm() { + modifier givenStreamWarm() { _; } @@ -35,13 +35,13 @@ abstract contract Cancel_Integration_Shared_Test is Lockup_Integration_Shared_Te _; } - modifier whenStreamCancelable() { + modifier givenStreamCancelable() { _; } /// @dev In the LockupLinear contract, the streaming starts after the cliff time, whereas in the LockupDynamic /// contract, the streaming starts after the start time. - modifier whenStatusStreaming() { + modifier givenStatusStreaming() { // Warp to the future, after the stream's start time but before the stream's end time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); _; @@ -52,11 +52,11 @@ abstract contract Cancel_Integration_Shared_Test is Lockup_Integration_Shared_Te _; } - modifier whenRecipientContract() { + modifier givenRecipientContract() { _; } - modifier whenRecipientImplementsHook() { + modifier givenRecipientImplementsHook() { _; } @@ -73,11 +73,11 @@ abstract contract Cancel_Integration_Shared_Test is Lockup_Integration_Shared_Te _; } - modifier whenSenderContract() { + modifier givenSenderContract() { _; } - modifier whenSenderImplementsHook() { + modifier givenSenderImplementsHook() { _; } diff --git a/test/integration/shared/lockup/cancelMultiple.t.sol b/test/integration/shared/lockup/cancelMultiple.t.sol index 05777bb0e..6efc4de97 100644 --- a/test/integration/shared/lockup/cancelMultiple.t.sol +++ b/test/integration/shared/lockup/cancelMultiple.t.sol @@ -32,11 +32,11 @@ abstract contract CancelMultiple_Integration_Shared_Test is Lockup_Integration_S _; } - modifier whenNoNull() { + modifier givenNoNull() { _; } - modifier whenAllStreamsWarm() { + modifier givenAllStreamsWarm() { _; } @@ -52,7 +52,7 @@ abstract contract CancelMultiple_Integration_Shared_Test is Lockup_Integration_S _; } - modifier whenAllStreamsCancelable() { + modifier givenAllStreamsCancelable() { _; } } diff --git a/test/integration/shared/lockup/getWithdrawnAmount.t.sol b/test/integration/shared/lockup/getWithdrawnAmount.t.sol index 63d091614..b88b483d7 100644 --- a/test/integration/shared/lockup/getWithdrawnAmount.t.sol +++ b/test/integration/shared/lockup/getWithdrawnAmount.t.sol @@ -10,12 +10,12 @@ abstract contract GetWithdrawnAmount_Integration_Shared_Test is Lockup_Integrati changePrank({ msgSender: users.recipient }); } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - modifier whenPreviousWithdrawals() { + modifier givenPreviousWithdrawals() { _; } } diff --git a/test/integration/shared/lockup/streamedAmountOf.t.sol b/test/integration/shared/lockup/streamedAmountOf.t.sol index 2810c83cc..da3f03619 100644 --- a/test/integration/shared/lockup/streamedAmountOf.t.sol +++ b/test/integration/shared/lockup/streamedAmountOf.t.sol @@ -10,19 +10,19 @@ abstract contract StreamedAmountOf_Integration_Shared_Test is Lockup_Integration defaultStreamId = createDefaultStream(); } - modifier whenNotNull() { + modifier givenNotNull() { _; } - modifier whenStreamHasBeenCanceled() { + modifier givenStreamHasBeenCanceled() { _; } - modifier whenStreamHasNotBeenCanceled() { + modifier givenStreamHasNotBeenCanceled() { _; } - modifier whenStatusStreaming() { + modifier givenStatusStreaming() { _; } diff --git a/test/integration/shared/lockup/withdraw.t.sol b/test/integration/shared/lockup/withdraw.t.sol index f60338b1d..9b5d21454 100644 --- a/test/integration/shared/lockup/withdraw.t.sol +++ b/test/integration/shared/lockup/withdraw.t.sol @@ -15,11 +15,11 @@ abstract contract Withdraw_Integration_Shared_Test is Lockup_Integration_Shared_ _; } - modifier whenNotNull() { + modifier givenNotNull() { _; } - modifier whenStreamNotDepleted() { + modifier givenStreamNotDepleted() { vm.warp({ timestamp: defaults.START_TIME() }); _; } diff --git a/test/integration/shared/lockup/withdrawMaxAndTransfer.t.sol b/test/integration/shared/lockup/withdrawMaxAndTransfer.t.sol index cbb9bcaa8..da1c44fc5 100644 --- a/test/integration/shared/lockup/withdrawMaxAndTransfer.t.sol +++ b/test/integration/shared/lockup/withdrawMaxAndTransfer.t.sol @@ -15,7 +15,7 @@ abstract contract WithdrawMaxAndTransfer_Integration_Shared_Test is Lockup_Integ _; } - modifier whenNotNull() { + modifier givenNotNull() { _; } @@ -23,11 +23,11 @@ abstract contract WithdrawMaxAndTransfer_Integration_Shared_Test is Lockup_Integ _; } - modifier whenNFTNotBurned() { + modifier givenNFTNotBurned() { _; } - modifier whenWithdrawableAmountNotZero() { + modifier givenWithdrawableAmountNotZero() { _; } } diff --git a/test/integration/shared/lockup/withdrawMultiple.t.sol b/test/integration/shared/lockup/withdrawMultiple.t.sol index bdbcbfea5..2896f77c7 100644 --- a/test/integration/shared/lockup/withdrawMultiple.t.sol +++ b/test/integration/shared/lockup/withdrawMultiple.t.sol @@ -49,11 +49,11 @@ abstract contract WithdrawMultiple_Integration_Shared_Test is Lockup_Integration _; } - modifier whenNoNull() { + modifier givenNoNull() { _; } - modifier whenNoDepletedStream() { + modifier givenNoDepletedStream() { vm.warp({ timestamp: defaults.START_TIME() }); _; } diff --git a/test/integration/shared/lockup/withdrawableAmountOf.t.sol b/test/integration/shared/lockup/withdrawableAmountOf.t.sol index dd953c0d2..609a9a2dd 100644 --- a/test/integration/shared/lockup/withdrawableAmountOf.t.sol +++ b/test/integration/shared/lockup/withdrawableAmountOf.t.sol @@ -8,20 +8,20 @@ abstract contract WithdrawableAmountOf_Integration_Shared_Test is Lockup_Integra function setUp() public virtual override { } - modifier whenNotNull() { + modifier givenNotNull() { defaultStreamId = createDefaultStream(); _; } - modifier whenStreamHasBeenCanceled() { + modifier givenStreamHasBeenCanceled() { _; } - modifier whenStreamHasNotBeenCanceled() { + modifier givenStreamHasNotBeenCanceled() { _; } - modifier whenStatusStreaming() { + modifier givenStatusStreaming() { _; } } diff --git a/test/unit/concrete/adminable/transfer-admin/transferAdmin.tree b/test/unit/concrete/adminable/transfer-admin/transferAdmin.tree index 2947f6ba7..e88b544c2 100644 --- a/test/unit/concrete/adminable/transfer-admin/transferAdmin.tree +++ b/test/unit/concrete/adminable/transfer-admin/transferAdmin.tree @@ -2,13 +2,13 @@ transferAdmin.t.sol ├── when the caller is not the admin │ └── it should revert └── when the caller is the admin - ├── when the admin is the same as the current admin + ├── when new admin is same as current admin │ ├── it should re-set the admin │ └── it should emit a {TransferAdmin} event - └── when the admin is not the same as the current admin - ├── when the admin is the zero address + └── when new admin is not same as current admin + ├── when the new admin is the zero address │ ├── it should set the admin to the zero address │ └── it should emit a {TransferAdmin} - └── when the admin is not the zero address + └── when the new admin is not the zero address ├── it should set the new admin └── it should emit a {TransferAdmin} event and set the new admin diff --git a/test/unit/concrete/comptroller/flash-fee/flashFee.tree b/test/unit/concrete/comptroller/flash-fee/flashFee.tree index 8d58642ea..04e7932b7 100644 --- a/test/unit/concrete/comptroller/flash-fee/flashFee.tree +++ b/test/unit/concrete/comptroller/flash-fee/flashFee.tree @@ -1,5 +1,5 @@ flashFee.t.sol -├── when the flash fee has not been set +├── given the flash fee has not been set │ └── it should return zero -└── when the flash fee has been set +└── given the flash fee has been set └── it should return the correct flash fee