Debian Codegraph @

vendor/cfg-if/tests/xcrate.rs

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