-
Notifications
You must be signed in to change notification settings - Fork 70
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: deposit test #692
Test: deposit test #692
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Let's try to make code coverage, %branches 90% or more @daryakaviani |
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, see note about fuzzing in future
|
||
assertEq(bullStrategy.balanceOf(user1), crabToDepositInitially); | ||
assertEq(IEulerDToken(dToken).balanceOf(address(bullStrategy)), usdcToBorrow); | ||
assertTrue(wethToLend.sub(IEulerEToken(eToken).balanceOfUnderlying(address(bullStrategy))) <= 1); |
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.
This is fine for this test, but if you add a fuzzing one, note that sometimes it gets to 2 wei difference.
|
||
assertEq(bullStrategy.balanceOf(user1).sub(userBullBalanceBefore), bullToMint); | ||
assertEq(IEulerDToken(dToken).balanceOf(address(bullStrategy)).sub(usdcToBorrow), usdcToBorrowSecond); | ||
assertTrue(wethToLendSecond.sub(IEulerEToken(eToken).balanceOfUnderlying(address(bullStrategy)).sub(wethToLend)) <= 1); |
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.
This is fine for this test, but if you add a fuzzing one, note that sometimes it gets to 2 wei difference.
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.
Added issue #696
looks good |
Task: deposit test
Should be merged after #690
Description
This PR add a second test case for
deposit()
Type of change
How Has This Been Tested
Please describe how to test to verify the changes. Provide instructions so we can reproduce.
FE Checklist
User Facing Checklist