third_party_rust_cfg-if/tests/xcrate.rs
2019-06-21 09:47:58 -07:00

15 lines
245 B
Rust

cfg_if::cfg_if! {
if #[cfg(foo)] {
fn works() -> bool { false }
} else if #[cfg(test)] {
fn works() -> bool { true }
} else {
fn works() -> bool { false }
}
}
#[test]
fn smoke() {
assert!(works());
}