rust/src/test/run-pass/log-degen-enum.rs
Niko Matsakis 48496fc1b6 add a test and correct terminology
newtype'd enums have 1 variant, and 1 field.
denegerate have only 1 variant but may have more fields.
2012-09-17 06:34:36 -07:00

8 lines
106 B
Rust

enum Foo = uint;
fn main() {
let x = Foo(1);
let y = fmt!("%?", x);
assert y == ~"Foo(1)";
}