-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test when array count is zero
- Loading branch information
Showing
2 changed files
with
57 additions
and
32 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
57 changes: 30 additions & 27 deletions
57
test/unit/lockup/shared/cancel-multiple/cancelMultiple.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,30 +1,33 @@ | ||
cancelMultiple.t.sol | ||
├── when the stream ids array points only to null streams | ||
├── when the array count is zero | ||
│ └── it should do nothing | ||
├── when the stream ids array points to some null streams | ||
│ └── it should ignore the null streams and cancel the non-null ones | ||
└── when the stream ids array points only to non-null streams | ||
├── when all streams are non-cancelable | ||
└── when the array count is not zero | ||
├── when the stream ids array points only to null streams | ||
│ └── it should do nothing | ||
├── when some of the streams are non-cancelable | ||
│ └── it should ignore the non-cancelable streams and cancel the cancelable streams | ||
└── when all streams are cancelable | ||
├── when the caller is unauthorized for any stream | ||
│ ├── when the caller is a malicious third-party | ||
│ │ └── it should revert | ||
│ ├── when the caller is an approved operator | ||
│ │ └── it should revert | ||
│ └── when the caller is a former recipient | ||
│ └── it should revert | ||
├── when the caller is unauthorized for some streams | ||
│ ├── when the caller is a malicious third-party | ||
│ │ └── it should revert | ||
│ ├── when the caller is an approved operator | ||
│ │ └── it should revert | ||
│ └── when the caller is a former recipient | ||
│ └── it should revert | ||
└── when the caller is authorized for all streams | ||
├── when the caller is the sender | ||
│ └── it should perform the ERC-20 transfers, cancel the streams, update the withdrawn amounts, and emit {CancelLockupStream} events | ||
└── when the caller is the recipient | ||
└── it should perform the ERC-20 transfers, cancel the streams, update the withdrawn amounts, and emit {CancelLockupStream} events | ||
├── when the stream ids array points to some null streams | ||
│ └── it should ignore the null streams and cancel the non-null ones | ||
└── when the stream ids array points only to non-null streams | ||
├── when all streams are non-cancelable | ||
│ └── it should do nothing | ||
├── when some of the streams are non-cancelable | ||
│ └── it should ignore the non-cancelable streams and cancel the cancelable streams | ||
└── when all streams are cancelable | ||
├── when the caller is unauthorized for any stream | ||
│ ├── when the caller is a malicious third-party | ||
│ │ └── it should revert | ||
│ ├── when the caller is an approved operator | ||
│ │ └── it should revert | ||
│ └── when the caller is a former recipient | ||
│ └── it should revert | ||
├── when the caller is unauthorized for some streams | ||
│ ├── when the caller is a malicious third-party | ||
│ │ └── it should revert | ||
│ ├── when the caller is an approved operator | ||
│ │ └── it should revert | ||
│ └── when the caller is a former recipient | ||
│ └── it should revert | ||
└── when the caller is authorized for all streams | ||
├── when the caller is the sender | ||
│ └── it should perform the ERC-20 transfers, cancel the streams, update the withdrawn amounts, and emit {CancelLockupStream} events | ||
└── when the caller is the recipient | ||
└── it should perform the ERC-20 transfers, cancel the streams, update the withdrawn amounts, and emit {CancelLockupStream} events |