New "ctest" feature is confusing
I think this would be a reasonable thing to do:
cd example-project
cargo test --all-features
However, it doesn't work, the tests fail.
OTOH, if I run
cargo ctest
... it doesn't only test the C API (which I would expect), but instead it tests everything, including the Rust-only tests.
Wouldn't it make more sense to separate the two kinds of tests a bit more?
What about establishing the convention of having all C API tests in a directory named ctests?
This way the two would be separated more clearly and I think the whole situation would be less confusing.
Or am I missing something?
In general cargo test --all-features is the best way to have surprising results and it should be actively avoided. The most common problem is when you have mutually exclusive features such as a crate supporting either tokio or async-std.
Right now ctest uses the testing infrastructure provided by cargo as-is. inline-c let you build tests as unit-tests and I do not have a mean to filter inline-c tests from the others.
Ergonomy-wise I'd expect the users to not run cargo test --features=capi.