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 1910b10da..922cf3fc7 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 @@ -91,7 +91,7 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount"); } - modifier whenCurrentMilestoneNot1st() { + modifier givenCurrentMilestoneNot1st() { _; } @@ -102,7 +102,7 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is givenStatusStreaming whenStartTimeInThePast givenMultipleSegments - whenCurrentMilestoneNot1st + givenCurrentMilestoneNot1st { // Simulate the passage of time. 750 seconds is ~10% of the way in the second segment. vm.warp({ timestamp: defaults.START_TIME() + defaults.CLIFF_DURATION() + 750 seconds }); 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 275d4f39c..50815136d 100644 --- a/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.tree +++ b/test/integration/concrete/lockup-dynamic/streamed-amount-of/streamedAmountOf.tree @@ -1,14 +1,14 @@ streamedAmountOf.t.sol └── given the stream's status is "STREAMING" - ├── when the start time is in the future + ├── given the start time is in the future │ └── it should return zero - ├── when the start time is in the present + ├── given the start time is in the present │ └── it should return zero - └── when the start time is in the past + └── given the start time is in the past ├── given there is one segment │ └── it should return the correct streamed amount └── given there are multiple segments - ├── when the current milestone is the 1st in the array + ├── given 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 + └── given the current milestone is not the 1st in the array └── it should return the correct streamed amount 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 9bd621cd6..f6532410a 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 @@ -30,7 +30,7 @@ contract WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test is assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - modifier whenStartTimeInThePast() { + modifier givenStartTimeInThePast() { _; } @@ -39,7 +39,7 @@ contract WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test is givenNotNull givenStreamHasNotBeenCanceled givenStatusStreaming - whenStartTimeInThePast + givenStartTimeInThePast { // Simulate the passage of time. vm.warp({ timestamp: defaults.START_TIME() + defaults.CLIFF_DURATION() + 3750 seconds }); @@ -60,7 +60,7 @@ contract WithdrawableAmountOf_LockupDynamic_Integration_Concrete_Test is givenNotNull givenStreamHasNotBeenCanceled givenStatusStreaming - whenStartTimeInThePast + givenStartTimeInThePast whenWithWithdrawals { // Simulate the passage of time. 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 ae1801f3a..fe3ff45ef 100644 --- a/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.tree +++ b/test/integration/concrete/lockup-dynamic/withdrawable-amount-of/withdrawableAmountOf.tree @@ -1,8 +1,8 @@ withdrawableAmountOf.t.sol └── given the stream's status is "STREAMING" - ├── when the start time is in the present + ├── given the start time is in the present │ └── it should return zero - └── when the start time is in the past + └── given the start time is in the past ├── given there are no previous withdrawals │ └── it should return the correct withdrawable amount └── given there are previous withdrawals 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 8b2d3639f..9c23e5349 100644 --- a/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.tree +++ b/test/integration/concrete/lockup-linear/streamed-amount-of/streamedAmountOf.tree @@ -1,8 +1,8 @@ streamedAmountOf.t.sol └── given the stream's status is "STREAMING" - ├── when the cliff time is in the past + ├── given the cliff time is in the past │ └── it should return zero - ├── when the cliff time is in the present + ├── given the cliff time is in the present │ └── it should return the correct streamed amount - └── when the cliff time is not in the future + └── given the cliff time is not in the future └── it should return the correct streamed amount 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 176ad7b35..d193126c9 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 @@ -29,7 +29,7 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test is assertEq(actualWithdrawableAmount, expectedWithdrawableAmount, "withdrawableAmount"); } - modifier whenCliffTimeNotInTheFuture() { + modifier givenCliffTimeNotInTheFuture() { vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); _; } @@ -39,7 +39,7 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test is givenNotNull givenStreamHasNotBeenCanceled givenStatusStreaming - whenCliffTimeNotInTheFuture + givenCliffTimeNotInTheFuture { uint128 actualWithdrawableAmount = lockupLinear.withdrawableAmountOf(defaultStreamId); uint128 expectedWithdrawableAmount = defaults.WITHDRAW_AMOUNT(); @@ -56,7 +56,7 @@ contract WithdrawableAmountOf_LockupLinear_Integration_Concrete_Test is givenNotNull givenStreamHasNotBeenCanceled givenStatusStreaming - whenCliffTimeNotInTheFuture + givenCliffTimeNotInTheFuture givenPreviousWithdrawals { uint128 actualWithdrawableAmount = lockupLinear.withdrawableAmountOf(defaultStreamId); 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 6ad39a5f9..1228656af 100644 --- a/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.tree +++ b/test/integration/concrete/lockup-linear/withdrawable-amount-of/withdrawableAmountOf.tree @@ -1,8 +1,8 @@ withdrawableAmountOf.t.sol └── given the stream's status is "STREAMING" - ├── when the cliff time is in the future + ├── given the cliff time is in the future │ └── it should return zero - └── when the cliff time is not in the future + └── given the cliff time is not in the future ├── given there are no previous withdrawals │ └── it should return the correct withdrawable amount └── given there are previous withdrawals diff --git a/test/integration/concrete/lockup/status-of/statusOf.t.sol b/test/integration/concrete/lockup/status-of/statusOf.t.sol index 55785fa45..75775ebe3 100644 --- a/test/integration/concrete/lockup/status-of/statusOf.t.sol +++ b/test/integration/concrete/lockup/status-of/statusOf.t.sol @@ -59,7 +59,7 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup assertEq(actualStatus, expectedStatus); } - modifier whenStartTimeNotInTheFuture() { + modifier givenStartTimeNotInTheFuture() { _; } @@ -68,7 +68,7 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup givenNotNull givenAssetsNotFullyWithdrawn givenStreamNotCanceled - whenStartTimeNotInTheFuture + givenStartTimeNotInTheFuture { vm.warp({ timestamp: defaults.END_TIME() }); Lockup.Status actualStatus = lockup.statusOf(defaultStreamId); @@ -85,7 +85,7 @@ abstract contract StatusOf_Integration_Concrete_Test is Integration_Test, Lockup givenNotNull givenAssetsNotFullyWithdrawn givenStreamNotCanceled - whenStartTimeNotInTheFuture + givenStartTimeNotInTheFuture givenRefundableAmountNotZero { vm.warp({ timestamp: defaults.START_TIME() + 1 seconds }); diff --git a/test/integration/concrete/lockup/status-of/statusOf.tree b/test/integration/concrete/lockup/status-of/statusOf.tree index 1910d7796..6d0bfda29 100644 --- a/test/integration/concrete/lockup/status-of/statusOf.tree +++ b/test/integration/concrete/lockup/status-of/statusOf.tree @@ -8,9 +8,9 @@ statusOf.t.sol ├── given the stream has been canceled │ └── it should return CANCELED └── given the stream has not been canceled - ├── when the start time is in the future + ├── given the start time is in the future │ └── it should return PENDING - └── when the start time is not in the future + └── given the start time is not in the future ├── given the refundable amount is zero │ └── it should return SETTLED └── given the refundable amount is not zero diff --git a/test/integration/concrete/lockup/withdraw-max/withdrawMax.t.sol b/test/integration/concrete/lockup/withdraw-max/withdrawMax.t.sol index 9572aa964..e6f83c856 100644 --- a/test/integration/concrete/lockup/withdraw-max/withdrawMax.t.sol +++ b/test/integration/concrete/lockup/withdraw-max/withdrawMax.t.sol @@ -49,7 +49,7 @@ abstract contract WithdrawMax_Integration_Concrete_Test is Integration_Test, Wit assertEq(actualNFTowner, expectedNFTOwner, "NFT owner"); } - function test_WithdrawMax() external whenEndTimeInTheFuture { + function test_WithdrawMax() external givenEndTimeInTheFuture { // Simulate the passage of time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); diff --git a/test/integration/concrete/lockup/withdraw-max/withdrawMax.tree b/test/integration/concrete/lockup/withdraw-max/withdrawMax.tree index 5124192fc..46b7d1190 100644 --- a/test/integration/concrete/lockup/withdraw-max/withdrawMax.tree +++ b/test/integration/concrete/lockup/withdraw-max/withdrawMax.tree @@ -1,11 +1,11 @@ withdrawMax.t.sol -├── when the end time is not in the future +├── given the end time is not in the future │ ├── it should make the max withdrawal │ ├── it should update the withdrawn amount │ ├── it should mark the stream as depleted │ ├── it should make the stream not cancelable │ └── it should emit a {WithdrawFromLockupStream} event -└── when the end time is in the future +└── given the end time is in the future ├── it should make the max withdrawal ├── it should update the withdrawn amount └── it should emit a {WithdrawFromLockupStream} event diff --git a/test/integration/concrete/lockup/withdraw/withdraw.t.sol b/test/integration/concrete/lockup/withdraw/withdraw.t.sol index c79dbe068..88faa15d5 100644 --- a/test/integration/concrete/lockup/withdraw/withdraw.t.sol +++ b/test/integration/concrete/lockup/withdraw/withdraw.t.sol @@ -225,7 +225,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr assertEq(actualNFTowner, expectedNFTOwner, "NFT owner"); } - modifier whenEndTimeInTheFuture() { + modifier givenEndTimeInTheFuture() { // Simulate the passage of time. vm.warp({ timestamp: defaults.WARP_26_PERCENT() }); _; @@ -241,7 +241,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender - whenEndTimeInTheFuture + givenEndTimeInTheFuture givenRecipientContract givenRecipientImplementsHook whenRecipientDoesNotRevert @@ -285,7 +285,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender - whenEndTimeInTheFuture + givenEndTimeInTheFuture whenStreamHasNotBeenCanceled { // Set the withdraw amount to the streamed amount. @@ -326,7 +326,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender - whenEndTimeInTheFuture + givenEndTimeInTheFuture whenStreamHasNotBeenCanceled givenRecipientContract { @@ -370,7 +370,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender - whenEndTimeInTheFuture + givenEndTimeInTheFuture whenStreamHasNotBeenCanceled givenRecipientContract givenRecipientImplementsHook @@ -415,7 +415,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender - whenEndTimeInTheFuture + givenEndTimeInTheFuture whenStreamHasNotBeenCanceled givenRecipientContract givenRecipientImplementsHook @@ -464,7 +464,7 @@ abstract contract Withdraw_Integration_Concrete_Test is Integration_Test, Withdr whenWithdrawAmountNotZero whenNoOverdraw whenCallerSender - whenEndTimeInTheFuture + givenEndTimeInTheFuture whenStreamHasNotBeenCanceled givenRecipientContract givenRecipientImplementsHook diff --git a/test/integration/concrete/lockup/withdraw/withdraw.tree b/test/integration/concrete/lockup/withdraw/withdraw.tree index b8e148431..c36b88582 100644 --- a/test/integration/concrete/lockup/withdraw/withdraw.tree +++ b/test/integration/concrete/lockup/withdraw/withdraw.tree @@ -32,11 +32,11 @@ withdraw.t.sol │ ├── it should make the withdrawal │ └── it should update the withdrawn amount └── when the caller is the sender - ├── when the end time is not in the future + ├── given the end time is not in the future │ ├── it should make the withdrawal │ ├── it should mark the stream as depleted │ └── it should make the stream not cancelable - └── when the end time is in the future + └── given the end time is in the future ├── given the stream has been canceled │ ├── it should make the withdrawal │ ├── it should mark the stream as depleted diff --git a/test/integration/fuzz/lockup/withdrawMax.t.sol b/test/integration/fuzz/lockup/withdrawMax.t.sol index 801888bc8..de6199755 100644 --- a/test/integration/fuzz/lockup/withdrawMax.t.sol +++ b/test/integration/fuzz/lockup/withdrawMax.t.sol @@ -51,7 +51,7 @@ abstract contract WithdrawMax_Integration_Fuzz_Test is Integration_Test, Withdra assertEq(actualNFTowner, expectedNFTOwner, "NFT owner"); } - function testFuzz_WithdrawMax(uint256 timeJump) external whenEndTimeInTheFuture { + function testFuzz_WithdrawMax(uint256 timeJump) external givenEndTimeInTheFuture { timeJump = _bound(timeJump, defaults.CLIFF_DURATION(), defaults.TOTAL_DURATION() - 1 seconds); // Simulate the passage of time. diff --git a/test/integration/shared/lockup/withdrawMax.t.sol b/test/integration/shared/lockup/withdrawMax.t.sol index a65e17681..a60582981 100644 --- a/test/integration/shared/lockup/withdrawMax.t.sol +++ b/test/integration/shared/lockup/withdrawMax.t.sol @@ -11,7 +11,7 @@ abstract contract WithdrawMax_Integration_Shared_Test is Lockup_Integration_Shar changePrank({ msgSender: users.recipient }); } - modifier whenEndTimeInTheFuture() { + modifier givenEndTimeInTheFuture() { _; } }