🔬This is a nightly-only experimental API. (
test
)Re-exports§
pub use crate::assert_test_result;
Experimentalpub use crate::bench::Bencher;
Experimentalpub use crate::filter_tests;
Experimentalpub use crate::run_test;
Experimentalpub use crate::test_main;
Experimentalpub use crate::test_main_static;
Experimentalpub use crate::test_result::TrFailed;
Experimentalpub use crate::test_result::TrFailedMsg;
Experimentalpub use crate::test_result::TrIgnored;
Experimentalpub use crate::test_result::TrOk;
Experimentalpub use crate::types::DynTestFn;
Experimentalpub use crate::types::DynTestName;
Experimentalpub use crate::types::StaticBenchFn;
Experimentalpub use crate::types::StaticTestFn;
Experimentalpub use crate::types::StaticTestName;
Experimental
Structs§
- MetricExperimental
- MetricMapExperimental
- OptionsExperimentalOptions for the test run defined by the caller (instead of CLI arguments). In case we want to add other options as well, just add them in this struct.
- TestDescExperimental
- TestDescAndFnExperimental
- TestExecTimeExperimentalThe measured execution time of a unit test.
- TestIdExperimental
- TestOptsExperimental
- TestTimeOptionsExperimentalStructure with parameters for calculating test execution time.
Enums§
- RunIgnoredExperimentalWhether ignored test should be run or not
- RunStrategyExperimental
- ShouldPanicExperimentalWhether test is expected to panic or not
- TestNameExperimental
- TestResultExperimental
- TestTypeExperimentalType of the test according to the Rust book conventions.
Functions§
- parse_optsExperimentalParses command line arguments into test options. Returns
None
if help was requested (since we only show help message and don’t run tests), returnsSome(Err(..))
if provided arguments are incorrect, otherwise creates aTestOpts
object and returns it.