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

Allow std in program tests #61

Open
jakehemmerle opened this issue Mar 13, 2024 · 0 comments
Open

Allow std in program tests #61

jakehemmerle opened this issue Mar 13, 2024 · 0 comments
Labels
code quality refactor; makes things simpler

Comments

@jakehemmerle
Copy link
Contributor

jakehemmerle commented Mar 13, 2024

There are several examples that simply have #![no_std] at the top, while this default should be changed to something more like #![cfg_attr(not(test), no_std)].

This won't affect the generated artifacts for compiling programs for production, but will allow for things like randomness to be used in tests.

This should be relatively trivial, but I'm not positive if it breaks things because we also use register_custom_getrandom!(always_fail); everywhere.

@jakehemmerle jakehemmerle added the code quality refactor; makes things simpler label Mar 13, 2024
@jakehemmerle jakehemmerle changed the title Allow std in tests Allow std in program tests Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality refactor; makes things simpler
Projects
None yet
Development

No branches or pull requests

1 participant