-
Notifications
You must be signed in to change notification settings - Fork 985
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
Migrate TickBitmap tests from HardHat to Foundry #320
Migrate TickBitmap tests from HardHat to Foundry #320
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- function test_isInitialized_isFlippedByFlapTick()**
- function test_isInitialized_isFlippedBackByFlapTick()**
- I think the name should be Flip instead of Flap.
good catch! |
b9fbe79
to
287ffd8
Compare
@ewilz I fixed typos and refactored tests to use forge-gas-snapshot, PR is ready for the review. |
The PR needs the same changes as #317 , in progress... |
287ffd8
to
4426e47
Compare
Hi @ewilz this PR is ready for another review round |
False) to Foundry. Ref: Uniswap#315
… tuple in one-liner. Ref: Uniswap#315
True) to Foundry. Ref: Uniswap#315
… test_isInitialized_isFlippedBackByFlipTick.
The test contract was a middle layer between library and was used by javascript / HardHat tests. Due to the middle layer using Foundry, gas cost usage was calculated incorrectly. Generate correct gas snapshots using direct library calls. Delete unnecessary comments. Ref: Uniswap#315
726eba1
to
11beab3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But i missed the following comments :-
// #isInitialized
// #flipTick
// #nextInitializedTickWithinOneWord
hardhat snapshots need to be deleted |
Can delete TickBitmapTest.sol and rename foundry test |
test migration looks good, not sure if you've ever written forge fuzz tests, with the recently committed FullMath conversion for instance, we took the echidna fuzz tests and converted them to forge fuzz tests, need to convert |
Hi @ewilz thank you for the review, I already pushed changes. I can have a look at fuzzing later this week after merging. |
woops sorry didn't think I had write access to your branch |
Yes I enabled write access, thanks for merging! |
Related Issue
This pull request migrates TickBitmap tests from HardHat to Foundry (35 test cases), a part of #315 .
Description of changes