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.rs8
-rw-r--r--src/libtest/stats.rs5
2 files changed, 5 insertions, 8 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 8266765ba3f..d5d0e7aeb17 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -33,7 +33,7 @@
        html_favicon_url = "http://www.rust-lang.org/favicon.ico",
        html_root_url = "http://doc.rust-lang.org/nightly/")]
 
-#![feature(asm, macro_rules, phase, globs)]
+#![feature(asm, macro_rules, phase, globs, slicing_syntax)]
 
 extern crate getopts;
 extern crate regex;
@@ -848,8 +848,6 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn> ) -> io::IoR
 
 #[test]
 fn should_sort_failures_before_printing_them() {
-    use std::io::MemWriter;
-
     let test_a = TestDesc {
         name: StaticTestName("a"),
         ignore: false,
@@ -864,7 +862,7 @@ fn should_sort_failures_before_printing_them() {
 
     let mut st = ConsoleTestState {
         log_out: None,
-        out: Raw(MemWriter::new()),
+        out: Raw(Vec::new()),
         use_color: false,
         total: 0u,
         passed: 0u,
@@ -878,7 +876,7 @@ fn should_sort_failures_before_printing_them() {
 
     st.write_failures().unwrap();
     let s = match st.out {
-        Raw(ref m) => String::from_utf8_lossy(m.get_ref()),
+        Raw(ref m) => String::from_utf8_lossy(m[]),
         Pretty(_) => unreachable!()
     };
 
diff --git a/src/libtest/stats.rs b/src/libtest/stats.rs
index daef41666af..1929f1989d6 100644
--- a/src/libtest/stats.rs
+++ b/src/libtest/stats.rs
@@ -1027,10 +1027,9 @@ mod tests {
     #[test]
     fn test_boxplot_nonpositive() {
         fn t(s: &Summary<f64>, expected: String) {
-            use std::io::MemWriter;
-            let mut m = MemWriter::new();
+            let mut m = Vec::new();
             write_boxplot(&mut m as &mut io::Writer, s, 30).unwrap();
-            let out = String::from_utf8(m.unwrap()).unwrap();
+            let out = String::from_utf8(m).unwrap();
             assert_eq!(out, expected);
         }