Add public re-exports for benches
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
//! Benchmarking module.
|
//! Benchmarking module.
|
||||||
|
pub use std::hint::black_box;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
event::CompletedTest,
|
event::CompletedTest,
|
||||||
helpers::sink::Sink,
|
helpers::sink::Sink,
|
||||||
@@ -14,7 +16,6 @@ use std::cmp;
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::panic::{catch_unwind, AssertUnwindSafe};
|
use std::panic::{catch_unwind, AssertUnwindSafe};
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::hint::black_box;
|
|
||||||
|
|
||||||
/// Manager of the benchmarking runs.
|
/// Manager of the benchmarking runs.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ pub use self::ColorConfig::*;
|
|||||||
pub use self::types::*;
|
pub use self::types::*;
|
||||||
pub use self::types::TestName::*;
|
pub use self::types::TestName::*;
|
||||||
pub use self::options::{Options, ShouldPanic};
|
pub use self::options::{Options, ShouldPanic};
|
||||||
|
pub use self::bench::{Bencher, black_box};
|
||||||
|
|
||||||
// Module to be used by rustc to compile tests in libtest
|
// Module to be used by rustc to compile tests in libtest
|
||||||
pub mod test {
|
pub mod test {
|
||||||
@@ -67,6 +68,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
pub mod stats;
|
pub mod stats;
|
||||||
|
pub mod bench;
|
||||||
mod formatters;
|
mod formatters;
|
||||||
mod cli;
|
mod cli;
|
||||||
mod console;
|
mod console;
|
||||||
@@ -75,7 +77,6 @@ mod helpers;
|
|||||||
mod time;
|
mod time;
|
||||||
mod types;
|
mod types;
|
||||||
mod options;
|
mod options;
|
||||||
mod bench;
|
|
||||||
mod test_result;
|
mod test_result;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
|||||||
Reference in New Issue
Block a user