Skip to content

Commit 2e69287

Browse files
committed
---
yaml --- r: 57022 b: refs/heads/try c: 1a36b0f h: refs/heads/master v: v3
1 parent eef0809 commit 2e69287

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c081ffbd1e845687202a975ea2e698b623e5722f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
5-
refs/heads/try: 10e6869a54b3d9e703ca6bc29f49f522ee25d865
5+
refs/heads/try: 1a36b0f17ef0b59411981fdd25ac9ce4ba7e20e0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/astencode.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,17 @@ fn roundtrip(in_item: Option<@ast::item>) {
13361336
let ebml_doc = reader::Doc(@bytes);
13371337
let out_item = decode_item_ast(ebml_doc);
13381338
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);
13401350
}
13411351

13421352
#[test]

branches/try/src/test/run-pass/auto-encode.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ use std::ebml;
2525
use std::serialize::{Decodable, Encodable};
2626
use std::time;
2727

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!`
2842
fn test_ebml<A:
2943
Eq +
3044
Encodable<EBWriter::Encoder> +

0 commit comments

Comments
 (0)