diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-11 11:14:14 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-15 23:22:15 -0700 |
| commit | 2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f (patch) | |
| tree | e4bebf36fa24fe0fe4dd6846291c59520ef1be28 /src/test | |
| parent | d12a136b2247ab5cf5b32e44a890b3a871c0ce90 (diff) | |
| download | rust-2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f.tar.gz rust-2e2160b026d7a2b2d13c3a2b4d6aa073ab3ff43f.zip | |
core: Update all tests for fmt movement
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/bench/shootout-chameneos-redux.rs | 6 | ||||
| -rw-r--r-- | src/test/run-pass/colorful-write-macros.rs | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/test/bench/shootout-chameneos-redux.rs b/src/test/bench/shootout-chameneos-redux.rs index 9db068e56c2..f0bc0204fd2 100644 --- a/src/test/bench/shootout-chameneos-redux.rs +++ b/src/test/bench/shootout-chameneos-redux.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// no-pretty-expanded + #![feature(phase)] #[phase(syntax)] extern crate green; @@ -33,7 +35,7 @@ impl fmt::Show for Color { Yellow => "yellow", Blue => "blue", }; - f.buf.write(str.as_bytes()) + write!(f, "{}", str) } } @@ -82,7 +84,7 @@ impl fmt::Show for Number { } for s in out.iter().rev() { - try!(f.buf.write(s.as_bytes())); + try!(write!(f, "{}", s)) } Ok(()) } diff --git a/src/test/run-pass/colorful-write-macros.rs b/src/test/run-pass/colorful-write-macros.rs index e9b32515187..14c2a5ae6c8 100644 --- a/src/test/run-pass/colorful-write-macros.rs +++ b/src/test/run-pass/colorful-write-macros.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// no-pretty-expanded + #![allow(unused_must_use, dead_code)] #![feature(macro_rules)] @@ -22,8 +24,9 @@ fn borrowing_writer_from_struct_and_formatting_struct_field(foo: Foo) { write!(foo.writer, "{}", foo.other); } -pub fn main() { +fn main() { let mut w = MemWriter::new(); write!(&mut w as &mut Writer, ""); write!(&mut w, ""); // should coerce + println!("ok"); } |
