🔬This is a nightly-only experimental API. (
test
)Re-exports§
pub use crate::bench::Bencher;
Experimental pub use crate::test_result::TrFailed;
Experimental pub use crate::test_result::TrFailedMsg;
Experimental pub use crate::test_result::TrIgnored;
Experimental pub use crate::test_result::TrOk;
Experimental pub use crate::types::DynTestFn;
Experimental pub use crate::types::DynTestName;
Experimental pub use crate::types::StaticBenchFn;
Experimental pub use crate::types::StaticTestFn;
Experimental pub use crate::types::StaticTestName;
Experimental pub use crate::assert_test_result;
Experimental pub use crate::filter_tests;
Experimental pub use crate::run_test;
Experimental pub use crate::test_main;
Experimental pub use crate::test_main_static;
Experimental
Structs§
- Metric
Experimental - Metric
Map Experimental - Options
Experimental Options 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. - Test
Desc Experimental - Test
Desc AndFn Experimental - Test
Exec Time Experimental The measured execution time of a unit test. - TestId
Experimental - Test
Opts Experimental - Test
Time Options Experimental Structure with parameters for calculating test execution time.
Enums§
- RunIgnored
Experimental Whether ignored test should be run or not - RunStrategy
Experimental - Should
Panic Experimental Whether test is expected to panic or not - Test
Name Experimental - Test
Result Experimental - Test
Type Experimental Type of the test according to the Rust book conventions.
Functions§
- parse_
opts Experimental Parses command line arguments into test options. ReturnsNone
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.