Crate test [−] [src]
🔬 This is a nightly-only experimental API. (
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.
Reexports
pub use self::TestFn::*; |
pub use self::ColorConfig::*; |
pub use self::TestResult::*; |
pub use self::TestName::*; |
Modules
| bench |
[ Experimental ]
|
| stats |
[ Experimental ]
|
| test |
[ Experimental ]
|
Structs
| BenchSamples |
[ Experimental ]
|
| Bencher |
[ Experimental ] Manager of the benchmarking runs. |
| Metric |
[ Experimental ]
|
| MetricMap |
[ Experimental ]
|
| TestDesc |
[ Experimental ]
|
| TestDescAndFn |
[ Experimental ]
|
| TestOpts |
[ Experimental ]
|
| TestPaths |
[ Experimental ]
|
Enums
| BenchMode |
[ Experimental ]
|
| ColorConfig |
[ Experimental ]
|
| NamePadding |
[ Experimental ]
|
| ShouldPanic |
[ Experimental ]
|
| TestEvent |
[ Experimental ]
|
| TestFn |
[ Experimental ]
|
| TestName |
[ Experimental ]
|
| TestResult |
[ Experimental ]
|
Traits
| FnBox |
[ Experimental ]
|
| TDynBenchFn |
[ Experimental ] Represents a benchmark function. |
Functions
| 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. |
| convert_benchmarks_to_tests |
[ Experimental ]
|
| filter_tests |
[ Experimental ]
|
| fmt_bench_samples |
[ Experimental ]
|
| iter |
[ Experimental ]
|
| list_tests_console |
[ Experimental ]
|
| parse_opts |
[ Experimental ]
|
| run_test |
[ Experimental ]
|
| run_tests |
[ Experimental ]
|
| run_tests_console |
[ Experimental ]
|
| test_main |
[ Experimental ]
|
| test_main_static |
[ Experimental ]
|
Type Definitions
| MonitorMsg |
[ Experimental ]
|
| OptRes |
[ Experimental ] Result of parsing the options. |