Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use "given" instead of "when" #678

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ contract StreamedAmountOf_LockupDynamic_Integration_Concrete_Test is
assertEq(actualStreamedAmount, expectedStreamedAmount, "streamedAmount");
}

modifier whenCurrentMilestoneNot1st() {
modifier givenCurrentMilestoneNot1st() {
_;
}

Expand All @@ -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 });
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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