rust/tests/ui/deriving/deriving-via-extension-c-enum.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
256 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
2015-01-28 07:34:18 -06:00
#[derive(PartialEq, Debug)]
enum Foo {
Bar,
Baz,
Boo
}
pub fn main() {
let a = Foo::Bar;
let b = Foo::Bar;
assert_eq!(a, b);
2013-03-28 20:39:09 -05:00
assert!(!(a != b));
assert!(a.eq(&b));
assert!(!a.ne(&b));
}