rust/src/test/run-pass/log-knows-the-names-of-variants.rs
2012-07-30 18:38:15 -07:00

12 lines
182 B
Rust

enum foo {
a(uint),
b(~str),
c,
}
fn main() {
assert ~"a(22)" == fmt!{"%?", a(22u)};
assert ~"b(~\"hi\")" == fmt!{"%?", b(~"hi")};
assert ~"c" == fmt!{"%?", c};
}