File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5
- refs/heads/try: 10e6869a54b3d9e703ca6bc29f49f522ee25d865
5
+ refs/heads/try: 1a36b0f17ef0b59411981fdd25ac9ce4ba7e20e0
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change @@ -1336,7 +1336,17 @@ fn roundtrip(in_item: Option<@ast::item>) {
1336
1336
let ebml_doc = reader::Doc(@bytes);
1337
1337
let out_item = decode_item_ast(ebml_doc);
1338
1338
1339
- assert_eq!( in_item, out_item) ;
1339
+ let exp_str = do io::with_str_writer |w| {
1340
+ in_item.encode(&prettyprint::Serializer(w))
1341
+ };
1342
+ let out_str = do io::with_str_writer |w| {
1343
+ out_item.encode(&prettyprint::Serializer(w))
1344
+ };
1345
+
1346
+ debug!(" expected string: %s", exp_str);
1347
+ debug!(" actual string : %s" , out_str) ;
1348
+
1349
+ assert ! ( exp_str == out_str) ;
1340
1350
}
1341
1351
1342
1352
#[ test]
Original file line number Diff line number Diff line change @@ -25,6 +25,20 @@ use std::ebml;
25
25
use std:: serialize:: { Decodable , Encodable } ;
26
26
use std:: time;
27
27
28
+ <<<<<<< HEAD
29
+ =======
30
+ fn test_prettyprint < A : Encodable < prettyprint:: Serializer > > (
31
+ a : & A ,
32
+ expected : & ~str
33
+ ) {
34
+ let s = do io:: with_str_writer |w | {
35
+ a. encode ( & prettyprint:: Serializer ( w ) )
36
+ } ;
37
+ debug ! ( "s == %?" , s) ;
38
+ assert ! ( s == * expected) ;
39
+ }
40
+
41
+ >>>>>>> librustc: Remove `fail_unless!`
28
42
fn test_ebml < A :
29
43
Eq +
30
44
Encodable < EBWriter :: Encoder > +
You can’t perform that action at this time.
0 commit comments