1 cfg_if::cfg_if! { 2 if #[cfg(foo)] { 3 fn works() -> bool { false } 4 } else if #[cfg(test)] { 5 fn works() -> bool { true } 6 } else { 7 fn works() -> bool { false } 8 } 9 } 10 11 #[test] smoke()12 fn smoke() { 13 assert!(works()); 14 } 15