2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-01-28 07:34:18 -06:00
|
|
|
#[derive(PartialEq, Debug)]
|
2015-03-25 19:06:52 -05:00
|
|
|
struct Foo(isize, isize, String);
|
2013-02-20 22:57:27 -06:00
|
|
|
|
|
|
|
pub fn main() {
|
2014-05-25 05:17:19 -05:00
|
|
|
let a1 = Foo(5, 6, "abc".to_string());
|
|
|
|
let a2 = Foo(5, 6, "abc".to_string());
|
|
|
|
let b = Foo(5, 7, "def".to_string());
|
2013-02-20 22:57:27 -06:00
|
|
|
|
2015-06-07 13:00:38 -05:00
|
|
|
assert_eq!(a1, a1);
|
|
|
|
assert_eq!(a2, a1);
|
2013-03-28 20:39:09 -05:00
|
|
|
assert!(!(a1 == b));
|
2013-02-20 22:57:27 -06:00
|
|
|
|
2013-03-28 20:39:09 -05:00
|
|
|
assert!(a1 != b);
|
|
|
|
assert!(!(a1 != a1));
|
2013-05-18 21:02:45 -05:00
|
|
|
assert!(!(a2 != a1));
|
2013-02-20 22:57:27 -06:00
|
|
|
}
|