aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / vendor / cfg-if / tests / xcrate.rs
| 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 | } |