I am starting with embedded rust. I've been poking around on my repo with cargo test. I've encountered a weird problem. When I run cargo test, which should run tests on host OS, I get:
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Enev though I have one test which should be ran. Any one have any idea why ? I've added all required macros.
The #![cfg(not(test))] inner attribute is applying to your entire file, making it effectively empty when tested. Perhaps you meant it to be an outer attribute #[cfg(not(test))] (with no !) applying to extern crate panic_halt; only.