rust/src/test/run-pass/deriving-via-extension-c-enum.rs

17 lines
188 B
Rust

#[deriving_eq]
enum Foo {
Bar,
Baz,
Boo
}
fn main() {
let a = Bar;
let b = Bar;
assert a == b;
assert !(a != b);
assert a.eq(&b);
assert !a.ne(&b);
}