-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(refactor): use bulloak for concrete tests (#153)
* test(refactor): use bulloak for concrete tests test(bulloak): deposit test(refactor): use 'delegate call' instead of 'deletage called' test(modifiers): rename to whenDepositAmountIsNotZero test(bulloak): adjustRatePerSecond test: use "when no delegate call", whenNoDelegateCall test: rename whenCallerIsNotSender to whenCallerNotSender test(bulloak): pause test: use getBlockTimestamp() test(bulloak): recent-amount-of test(bulloak): refund test(bulloak): refundableAmountOf test(bulloak): restart test(bulloak): restartAndDeposit test(bulloak): streamDebtOf test(bulloak): transferFrom test(bulloak): withdrawableAmountOf test(refactor): rename createDefaultStreamWithAsset to createStreamWithAsset test(refactor): use "when" for last time update in branches test(bulloak): withdrawMax test(bulloak): create and withdrawAt test(refactor): remove redundant modifiers * fix: merge conflicts * test(refactor): move Helper libraries to Integration * test(fix): test_WhenAmountOwedExceedsBalance in WithdrawAt_Integration_Concrete_Test * refactor: rename custom error test: move functions in Utils test: move function in Integration_Test test: remove "Is" from tree branches test: "It should revert" comments * test: fix comments * test: fix bulloak warnings --------- Co-authored-by: andreivladbrg <andreivladbrg@gmail.com>
- Loading branch information
1 parent
56ae6ab
commit 239d8c6
Showing
52 changed files
with
914 additions
and
1,103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 19 additions & 27 deletions
46
test/integration/concrete/adjust-rate-per-second/adjustRatePerSecond.tree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
adjustRatePerSecond.t.sol | ||
βββ when delegate called | ||
AdjustRatePerSecond_Integration_Concrete_Test | ||
βββ when delegate call | ||
β βββ it should revert | ||
βββ when not delegate called | ||
βββ given the id references a null stream | ||
βββ when no delegate call | ||
βββ given null | ||
β βββ it should revert | ||
βββ given the id does not reference a null stream | ||
βββ given the id references a paused stream | ||
βββ given not null | ||
βββ given paused | ||
β βββ it should revert | ||
βββ given the id does not reference a paused stream | ||
βββ when the caller is not the sender | ||
β βββ when the caller is the recipient | ||
βββ given not paused | ||
βββ when caller not sender | ||
β βββ when caller recipient | ||
β β βββ it should revert | ||
β βββ when the caller is a malicious third party | ||
β βββ when caller malicious third party | ||
β βββ it should revert | ||
βββ when the caller is the sender | ||
βββ when the provided rate per second is zero | ||
βββ when caller sender | ||
βββ when new rate per second zero | ||
β βββ it should revert | ||
βββ when the provided rate per second is not zero | ||
βββ when the provided rate per second is equal to the actual rate per second | ||
βββ when new rate per second not zero | ||
βββ when new rate per second equals current rate per second | ||
β βββ it should revert | ||
βββ when the provided rate per second is not equal to the actual rate per second | ||
βββ given the withdrawable amount is zero | ||
β βββ it should update the stream remaining amount | ||
β βββ it should update the rate per second | ||
β βββ it should update the stream time | ||
β βββ it should emit a {AdjustFlowStream} event | ||
β βββ it should emit a {MetadataUpdate} event | ||
βββ given the withdrawable amount is not zero | ||
βββ it should update the stream remaining amount | ||
βββ it should update the rate per second | ||
βββ it should update the stream time | ||
βββ it should emit a {AdjustFlowStream} event | ||
βββ it should emit a {MetadataUpdate} event | ||
βββ when new rate per second not equals current rate per second | ||
βββ it should update remaining amount | ||
βββ it should update lastTimeUpdate | ||
βββ it should set the new rate per second | ||
βββ it should emit 1 {AdjustFlowStream}, 1 {MetadataUpdate} events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/integration/concrete/create-and-deposit-via-broker/createAndDepositViaBroker.tree
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.