Cargo Features
[dependencies]
datatest = { version = "0.8.0", default-features = false, features = ["test_case_registration", "unsafe_test_runner", "subvert_stable_guarantees"] }
- test_case_registration default
-
Use
#[test_case]
-based test registration. If this is disabled, datatest will use thector
crate to create a global list of all tests.Enabled by default, only takes effect on nightly and only works when custom_test_frameworks feature is enabled.
- unsafe_test_runner = region
-
Use very, very, very sketchy way of intercepting a test runner on a stable Rust. Without that feature, there are two options:
- use
#![test_runner(datatest::runner)]
(nightly-only) - use
harness = false
inCargo.toml
withdatatest::harness!()
macro; however, in this case care must be taken to use#[datatest::test]
instead of regular#[test]
or otherwise tests will be silently ignored.
- use
- subvert_stable_guarantees
-
Make this crate useable on stable Rust channel. Uses forbidden technique to allow usage of this crate on a stable Rust compiler. This, however, does not bring any guarantees above "nightly" -- this crate can break at any time.
- default = test_case_registration
-
The
test_case_registration
feature is set by default wheneverdatatest
is added without
somewhere in the dependency tree.default-features = false
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.