#[macro_use] extern crate enumer_derive; #[test] fn smoke() { #[derive(Debug, EnumIter, PartialEq, Eq)] enum Test { A, B(bool), C(u32, i64), D { name: String, flag: bool }, } let mut iter = Test::iter(); assert_eq!(Some(Test::A), iter.next()); assert_eq!(Some(Test::B(false)), iter.next()); assert_eq!(Some(Test::C(0, 0)), iter.next()); assert_eq!( Some(Test::D { name: "".into(), flag: false, }), iter.next() ); assert_eq!(None, iter.next()); }