diff options
| author | Ahmed Charles <acharles@outlook.com> | 2015-01-21 01:45:24 -0800 |
|---|---|---|
| committer | Ahmed Charles <acharles@outlook.com> | 2015-01-22 00:56:10 -0800 |
| commit | 27b3e14d7fa5f6e07f38ca174daed489edcfc113 (patch) | |
| tree | b8c296a3a317e616e239467bec4f5c92ed95ded1 /src/libtest | |
| parent | 5d2056a7e3e52b2aec41662cfd960e0eafe8494c (diff) | |
| download | rust-27b3e14d7fa5f6e07f38ca174daed489edcfc113.tar.gz rust-27b3e14d7fa5f6e07f38ca174daed489edcfc113.zip | |
Cleanup write_run_finish().
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 98e031f863e..86a92f0ac8f 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -624,34 +624,14 @@ impl<T: Writer> ConsoleTestState<T> { Ok(()) } - pub fn write_run_finish(&mut self, - ratchet_metrics: &Option<Path>, - ratchet_pct: Option<f64>) -> io::IoResult<bool> { + pub fn write_run_finish(&mut self) -> io::IoResult<bool> { assert!(self.passed + self.failed + self.ignored + self.measured == self.total); - let ratchet_success = match *ratchet_metrics { - None => true, - Some(ref pth) => { - try!(self.write_plain(format!("\nusing metrics ratchet: {:?}\n", - pth.display()).as_slice())); - match ratchet_pct { - None => (), - Some(pct) => - try!(self.write_plain(format!("with noise-tolerance \ - forced to: {}%\n", - pct).as_slice())) - } - true - } - }; - - let test_success = self.failed == 0u; - if !test_success { + let success = self.failed == 0u; + if !success { try!(self.write_failures()); } - let success = ratchet_success && test_success; - try!(self.write_plain("\ntest result: ")); if success { // There's no parallelism at this point so it's safe to use color @@ -745,7 +725,7 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn> ) -> io::IoR None => {} } try!(run_tests(opts, tests, |x| callback(&x, &mut st))); - return st.write_run_finish(&None, None); + return st.write_run_finish(); } #[test] |
