rustc: fix astencode test
This commit is contained in:
parent
5b7d608bf6
commit
810c4d8a1e
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user