-
Notifications
You must be signed in to change notification settings - Fork 151
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
Make it easier to test hints implemented out of the cairo-vm repository #1595
Comments
For the first point, the |
The problem with |
Hello,
We're currently developing some hints for a project. These hints live in a different Git repository. We developed hints for the bootloader in a fork of
cairo-vm
so I hadn't noticed yet, but it is surprisingly way more difficult to write unit tests out of the repository. Example:If we take a hint
We can easily write a unit test for this in the
cairo-vm
repository like this:But out of tree, things become more complex / impossible.
So we're in a situation where AP/FP manipulations are impossible because of VM members being
pub(crate)
and the utils macros are not public so they need to be reimplemented manually.The first point is the one that actually is blocking, so I would like your opinion on the matter. What's a good solution there? Making VM fields
pub
instead ofpub(crate)
? Adding accessors? Another solution I have not thought of?Describe the solution you'd like
Ideally, it should be possible to write unit tests the same way independently of where the implementation lives.
Additional context
This is related to the implementation of hints for the bootloader and Starknet OS.
The text was updated successfully, but these errors were encountered: