cargo test
always fails to run.
#1000
-
Hi all, When I run
Because some features are disabled. BTW, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @HaoYang670 . So, the idea is:
My usual dev flow is: If I am working on a core aspect (no feature flags), run Ideas on how to improve the situation are welcome, though :) |
Beta Was this translation helpful? Give feedback.
Hey @HaoYang670 . So, the idea is:
cargo test --tests
covers everything that is not feature-flagged.cargo test --lib
is mostly for tests covering functions that are not public (we have very few).cargo test
includes examples. Unfortunatelycargo
does not support declaring which feature flags each example requires, and thus we can't provide acargo test
that only tests the examples that do not depend on a feature flag.My usual dev flow is:
If I am working on a core aspect (no feature flags), run
cargo test --tests
. If I am working on a specific feature, runcargo test --features ... --tests
. I seldom usecargo test --features full
, since the CI will handle it (and it seldom provides valu…