Rollup merge of #39815 - oli-obk:patch-3, r=aturon
enable tools to use test runners programmatically
This commit is contained in:
commit
c07aa14201
@ -106,7 +106,7 @@ impl fmt::Display for TestName {
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
enum NamePadding {
|
||||
pub enum NamePadding {
|
||||
PadNone,
|
||||
PadOnRight,
|
||||
}
|
||||
@ -950,7 +950,7 @@ fn stdout_isatty() -> bool {
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
enum TestEvent {
|
||||
pub enum TestEvent {
|
||||
TeFiltered(Vec<TestDesc>),
|
||||
TeWait(TestDesc, NamePadding),
|
||||
TeResult(TestDesc, TestResult, Vec<u8>),
|
||||
@ -960,7 +960,7 @@ enum TestEvent {
|
||||
pub type MonitorMsg = (TestDesc, TestResult, Vec<u8>);
|
||||
|
||||
|
||||
fn run_tests<F>(opts: &TestOpts, tests: Vec<TestDescAndFn>, mut callback: F) -> io::Result<()>
|
||||
pub fn run_tests<F>(opts: &TestOpts, tests: Vec<TestDescAndFn>, mut callback: F) -> io::Result<()>
|
||||
where F: FnMut(TestEvent) -> io::Result<()>
|
||||
{
|
||||
use std::collections::HashMap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user