Skip to content

Commit 810c4d8

Browse files
committed
rustc: fix astencode test
1 parent 5b7d608 commit 810c4d8

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/librustc/middle/astencode.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,6 @@ fn mk_ctxt() -> @fake_ext_ctxt {
12121212
#[cfg(test)]
12131213
fn roundtrip(in_item: Option<@ast::item>) {
12141214
use core::io;
1215-
use std::prettyprint;
12161215

12171216
let in_item = in_item.get();
12181217
let bytes = do io::with_bytes_writer |wr| {
@@ -1222,17 +1221,7 @@ fn roundtrip(in_item: Option<@ast::item>) {
12221221
let ebml_doc = reader::Doc(@bytes);
12231222
let out_item = decode_item_ast(ebml_doc);
12241223

1225-
let exp_str = do io::with_str_writer |w| {
1226-
in_item.encode(&prettyprint::Serializer(w))
1227-
};
1228-
let out_str = do io::with_str_writer |w| {
1229-
out_item.encode(&prettyprint::Serializer(w))
1230-
};
1231-
1232-
debug!("expected string: %s", exp_str);
1233-
debug!("actual string : %s", out_str);
1234-
1235-
assert!(exp_str == out_str);
1224+
assert_eq!(in_item, out_item);
12361225
}
12371226

12381227
#[test]

0 commit comments

Comments
 (0)