Skip to content

Conversation

@skaunov
Copy link

@skaunov skaunov commented Oct 21, 2025

I want to use impl Arbitrary downstream in my (utilities) tests.

Should the property tests be arb feature-gated?

I inclinde to no because the tests are not feature-specific and it's a good thing cargo t fails until like --features is added.

#[cfg(any(test, feature = "arb"))]

I considered this approach but having some experience with it shows that syncing versions between the feature and dev.dependencies is a nuisance. Being more naive it doesn't add much (only the working cargo t but it works smoothly when the feature is added).

# Should the property test be `arb` feature-gated?
I inclinde to *no* because the tests are not feature-specific and it's a good thing `cargo t` fails until like `--features` is added.
# `#[cfg(any(test, feature = "arb"))]`
I considered this approach but having some experience with it shows that syncing versions between the feature and dev.dependencies is a nuisance. Being more naive it doesn't add much (only working `cargo t` but it works smoothly adding the feature).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant