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