Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/cfg-if/tests/xcrate.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / cfg-if / tests / xcrate.rs` 16 lines ยท 296 bytes Raw Blame History 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 }