1
Fork 0

repr: print the name of structs

This commit is contained in:
Daniel Micay 2013-08-31 00:15:55 -04:00
parent 6a225951e3
commit 874611b348
12 changed files with 50 additions and 34 deletions

View file

@ -3681,10 +3681,12 @@ mod tests {
assert_eq!(cnt, 11);
let xs = ~[Foo, Foo, Foo];
assert_eq!(fmt!("%?", xs.slice(0, 2).to_owned()), ~"~[{}, {}]");
assert_eq!(fmt!("%?", xs.slice(0, 2).to_owned()),
~"~[vec::tests::Foo{}, vec::tests::Foo{}]");
let xs: [Foo, ..3] = [Foo, Foo, Foo];
assert_eq!(fmt!("%?", xs.slice(0, 2).to_owned()), ~"~[{}, {}]");
assert_eq!(fmt!("%?", xs.slice(0, 2).to_owned()),
~"~[vec::tests::Foo{}, vec::tests::Foo{}]");
cnt = 0;
for f in xs.iter() {
assert!(*f == Foo);