about summary refs log tree commit diff
path: root/src/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtest')
-rw-r--r--src/libtest/lib.rs11
-rw-r--r--src/libtest/stats.rs19
2 files changed, 2 insertions, 28 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index ca8a60553ab..1f6341f4955 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -39,13 +39,12 @@
 #![feature(collections)]
 #![feature(core)]
 #![feature(int_uint)]
-#![feature(old_io)]
 #![feature(rustc_private)]
 #![feature(staged_api)]
 #![feature(std_misc)]
 #![feature(io)]
 #![feature(libc)]
-#![feature(set_panic)]
+#![feature(set_stdio)]
 
 extern crate getopts;
 extern crate serialize;
@@ -909,7 +908,6 @@ pub fn run_test(opts: &TestOpts,
         return;
     }
 
-    #[allow(deprecated)] // set_stdout
     fn run_test_inner(desc: TestDesc,
                       monitor_ch: Sender<MonitorMsg>,
                       nocapture: bool,
@@ -921,11 +919,6 @@ pub fn run_test(opts: &TestOpts,
             }
             fn flush(&mut self) -> io::Result<()> { Ok(()) }
         }
-        impl Writer for Sink {
-            fn write_all(&mut self, data: &[u8]) -> std::old_io::IoResult<()> {
-                Writer::write_all(&mut *self.0.lock().unwrap(), data)
-            }
-        }
 
         thread::spawn(move || {
             let data = Arc::new(Mutex::new(Vec::new()));
@@ -937,7 +930,7 @@ pub fn run_test(opts: &TestOpts,
 
             let result_guard = cfg.spawn(move || {
                 if !nocapture {
-                    std::old_io::stdio::set_stdout(box Sink(data2.clone()));
+                    io::set_print(box Sink(data2.clone()));
                     io::set_panic(box Sink(data2));
                 }
                 testfn.invoke(())
diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs
index 42812e1e597..84d86c5746c 100644
--- a/src/libtest/stats.rs
+++ b/src/libtest/stats.rs
@@ -11,9 +11,6 @@
 #![allow(missing_docs)]
 
 use std::cmp::Ordering::{self, Less, Greater, Equal};
-use std::collections::hash_map::Entry::{Occupied, Vacant};
-use std::collections::hash_map;
-use std::hash::Hash;
 use std::mem;
 use std::num::{Float, FromPrimitive};
 
@@ -330,22 +327,6 @@ pub fn winsorize<T: Float + FromPrimitive>(samples: &mut [T], pct: T) {
     }
 }
 
-/// Returns a HashMap with the number of occurrences of every element in the
-/// sequence that the iterator exposes.
-#[cfg(not(stage0))]
-pub fn freq_count<T, U>(iter: T) -> hash_map::HashMap<U, uint>
-  where T: Iterator<Item=U>, U: Eq + Clone + Hash
-{
-    let mut map: hash_map::HashMap<U,uint> = hash_map::HashMap::new();
-    for elem in iter {
-        match map.entry(elem) {
-            Occupied(mut entry) => { *entry.get_mut() += 1; },
-            Vacant(entry) => { entry.insert(1); },
-        }
-    }
-    map
-}
-
 // Test vectors generated from R, using the script src/etc/stat-test-vectors.r.
 
 #[cfg(test)]