entropyxyz / manul

Round-based distributed protocols
https://docs.rs/manul
GNU Affero General Public License v3.0
6 stars 1 forks source link

Separate testing utilities into their own crate #27

Closed fjarri closed 1 month ago

fjarri commented 1 month ago

In the testing submodule we have some useful utilities. It would be nice to gate them behind a feature so that regular crate users didn't need to compile that part of the code. The problem is, we use those utilities in manul's own unit-tests, and it's currently impossible to enable a feature for tests only (see https://github.com/rust-lang/cargo/issues/2911).

So a possible solution is to separate the testing utilities into another crate, and use it in dev-dependencies of manul.

fjarri commented 1 month ago

Gated under a feature in #31. Writing doctests may be awkward, but then again, we're better off putting such tests in example. Closing for now.