-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add more assets in invariant tests #158
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.
Nice work @andreivladbrg. I've left my feedback below.
Unless, we are going to use this array in integration tests, I think its better to keep it in Flow contract. |
f0695b2
to
6fa8fbf
Compare
test: add an array of assets in CreateHandler test: fuzz the asset in CreateHandler test: remove unneeded Invariant_Test contract test: remove checkUsers modifier test: move test contracts in BaseHandler test: run invariant_ContractBalanceGeStreamBalances test for all assets test: add a helper function to prevent stack too deep error test: use assume instead of "if() return"
6fa8fbf
to
628e595
Compare
@smol-ninja i've addressed your feedback, lmk if i missed anything |
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.
Lezzzz go 🚀
Linked issues
vm.assume
in invariant handlers instead of returning #157Changes
FlowCreateHandler
useFuzzedAsset
modifier inFlowCreateHandler
Invariant_Test
contractFlowCreateHandler
to preventStack too deep
errorBaseHandler
invariant_ContractBalanceGeStreamBalances
test for all assetsvm.assume
instead ofif(condition) return
Note: I wanted to add the array of assets from
test/invariant/Flow.t.sol
toBase_Test
, but I didn’t do it to prevent git conflicts.