repr: print the name of structs
This commit is contained in:
parent
6a225951e3
commit
874611b348
12 changed files with 50 additions and 34 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue