about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-02-24 13:22:52 +0100
committerGitHub <noreply@github.com>2017-02-24 13:22:52 +0100
commitc07aa1420143fe2ba1116f54dbb330088503a3d6 (patch)
treedab6ba7db5d3f2aff903862e0b8b24d1f21b8b01
parent246b1db3ec6f2cfc1a5b645f6b709c700864a640 (diff)
parent80ac32330f35c5994d5d5f9e17bbe0dd9f1fdee3 (diff)
downloadrust-c07aa1420143fe2ba1116f54dbb330088503a3d6.tar.gz
rust-c07aa1420143fe2ba1116f54dbb330088503a3d6.zip
Rollup merge of #39815 - oli-obk:patch-3, r=aturon
enable tools to use test runners programmatically
-rw-r--r--src/libtest/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 112bf61cf97..5fdb0aa0641 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -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;