programs icon indicating copy to clipboard operation
programs copied to clipboard

Allow `std` in program tests

Open jakehemmerle opened this issue 1 year ago • 0 comments

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 avatar Mar 13 '24 21:03 jakehemmerle