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
257 B
Rust
Raw Normal View History

//@ run-pass
#![allow(dead_code)]
2015-01-28 13:34:18 +00: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-29 01:39:09 +00:00
assert!(!(a != b));
assert!(a.eq(&b));
assert!(!a.ne(&b));
}