rustc: fix astencode test

This commit is contained in:
Erick Tryzelaar 2013-03-30 15:04:24 -07:00
parent 5b7d608bf6
commit 810c4d8a1e

View File

@ -1212,7 +1212,6 @@ fn mk_ctxt() -> @fake_ext_ctxt {
#[cfg(test)]
fn roundtrip(in_item: Option<@ast::item>) {
use core::io;
use std::prettyprint;
let in_item = in_item.get();
let bytes = do io::with_bytes_writer |wr| {
@ -1222,17 +1221,7 @@ fn roundtrip(in_item: Option<@ast::item>) {
let ebml_doc = reader::Doc(@bytes);
let out_item = decode_item_ast(ebml_doc);
let exp_str = do io::with_str_writer |w| {
in_item.encode(&prettyprint::Serializer(w))
};
let out_str = do io::with_str_writer |w| {
out_item.encode(&prettyprint::Serializer(w))
};
debug!("expected string: %s", exp_str);
debug!("actual string : %s", out_str);
assert!(exp_str == out_str);
assert_eq!(in_item, out_item);
}
#[test]