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 the ctor 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:

  1. use #![test_runner(datatest::runner)] (nightly-only)
  2. use harness = false in Cargo.toml with datatest::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.
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 whenever datatest is added without default-features = false somewhere in the dependency tree.

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.

region unsafe_test_runner?