[−][src]Crate test
test)Support code for rustc's built in unit-test and micro-benchmarking framework.
Almost all user code will only be interested in Bencher and
black_box. All other interactions (such as writing tests and
benchmarks themselves) should be done via the #[test] and
#[bench] attributes.
See the Testing Chapter of the book for more details.
Re-exports
pub use libtest::DynTestFn; |
pub use libtest::DynTestName; |
pub use libtest::StaticBenchFn; |
pub use libtest::StaticTestFn; |
pub use libtest::StaticTestName; |
pub use libtest::TrFailed; |
pub use libtest::TrFailedMsg; |
pub use libtest::TrIgnored; |
pub use libtest::TrOk; |
Structs
| Bencher | Experimental Manager of the benchmarking runs. |
| Metric | Experimental |
| MetricMap | Experimental |
| Options | Experimental In case we want to add other options as well, just add them in this struct. |
| Summary | Experimental Extracted collection of all the summary statistics of a sample set. |
| TestDesc | Experimental |
| TestDescAndFn | Experimental |
| TestOpts | Experimental |
Enums
| RunIgnored | Experimental |
| ShouldPanic | Experimental |
| TestName | Experimental |
| TestResult | Experimental |
Functions
| assert_test_result | Experimental Invoked when unit tests terminate. Should panic if the unit
Tests is considered a failure. By default, invokes |
| black_box | Experimental A function that is opaque to the optimizer, to allow benchmarks to pretend to use outputs to assist in avoiding dead-code elimination. |
| filter_tests | Experimental |
| parse_opts | Experimental |
| run_test | Experimental |
| test_main | Experimental |
| test_main_static | Experimental |