japaric / utest

Unit `#[test]`ing for microcontrollers and other `no_std` systems
125 stars 7 forks source link

could not find `TestType` in `test` #6

Open dmakarov opened 3 years ago

dmakarov commented 3 years ago

When I'm compiling my tests using utest I get the following error

error[E0433]: failed to resolve: could not find `TestType` in `test`

What am I doing wrong?

japaric commented 3 years ago

Hey @dmakarov . As the README states

WARNING This crate relies on #[test] / rustc implementation details and could break at any time.

this crate relies on unstable details about the test crate so it's prone to breakage. I don't plan to update this repository but if you would still like to try the code in here you'll need to rollback your Rust toolchain to a version that's compatible -- looking at the commit history that's probably a toolchain from February 2018.

I don't recommend this approach for testing no_std code anymore as it's prone to breakage. For a more stable approach you can use a custom Cargo runner as it's done in defmt-test.