Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: What's the use case for a library integ test as opposed to a unit test?
I don't understand the point of integ tests for a lib. Whatever you can do in a library you can also do as a unit test, but unit tests can also test private functions. What's the benefit here?
The only thing I can think of is that restriction is a feature, as in it ensures that your public API has everything needed to function properly (i.e. things that need to be pub are pub).
I also am curious why cargo test doesn't seem to differentiate between unit or integ tests. I'd think that a lot of binary integration tests wouldn't want to automatically be run locally, while unit tests should be fine.
1 post - 1 participant
🏷️ rust_feed