blob: 47d088cfc6f266cfa5806bc681b9c8a0b4138f9c [file] [log] [blame]
Graydon Hoared1affff2012-12-11 01:32:481// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
Andrew Paseltinerec960962013-03-20 15:42:5911#[deriving(Eq)]
Patrick Waltona7aecc42012-11-20 02:05:5012enum Foo {
13 Bar,
14 Baz,
15 Boo
16}
17
Graydon Hoare89c8ef72013-02-02 03:43:1718pub fn main() {
Patrick Waltona7aecc42012-11-20 02:05:5019 let a = Bar;
20 let b = Bar;
Patrick Waltond7e74b52013-03-06 21:58:0221 fail_unless!(a == b);
22 fail_unless!(!(a != b));
23 fail_unless!(a.eq(&b));
24 fail_unless!(!a.ne(&b));
Patrick Waltona7aecc42012-11-20 02:05:5025}
26