2018-08-30 12:18:55 +00:00
|
|
|
// run-pass
|
2018-09-25 21:51:35 +00:00
|
|
|
#![allow(dead_code)]
|
2015-01-28 13:34:18 +00:00
|
|
|
#[derive(PartialEq, Debug)]
|
2012-11-20 20:59:37 +00:00
|
|
|
enum Foo {
|
2015-03-26 00:06:52 +00:00
|
|
|
Bar(isize, isize),
|
2013-09-26 06:26:09 +00:00
|
|
|
Baz(f64, f64)
|
2012-11-20 20:59:37 +00:00
|
|
|
}
|
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {
|
2014-11-06 08:05:53 +00:00
|
|
|
let a = Foo::Bar(1, 2);
|
|
|
|
let b = Foo::Bar(1, 2);
|
2013-05-19 02:02:45 +00:00
|
|
|
assert_eq!(a, b);
|
2013-03-29 01:39:09 +00:00
|
|
|
assert!(!(a != b));
|
|
|
|
assert!(a.eq(&b));
|
|
|
|
assert!(!a.ne(&b));
|
2012-11-20 20:59:37 +00:00
|
|
|
}
|