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/bitflags/src/tests/clear.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 / bitflags / src / tests / clear.rs` 27 lines ยท 534 bytes Raw Blame History 1 use super::*; 2 3 use crate::Flags; 4 5 #[test] 6 fn cases() { 7 case(TestFlags::from_bits_retain(0)); 8 9 case(TestFlags::from_bits_retain(1 << 3)); 10 11 case(TestFlags::ABC | TestFlags::from_bits_retain(1 << 3)); 12 13 case(TestZero::empty()); 14 15 case(TestZero::all()); 16 17 case(TestFlags::from_bits_retain(1 << 3) | TestFlags::all()); 18 } 19 20 #[track_caller] 21 fn case(mut flags: T) 22 where 23 T: std::fmt::Debug + PartialEq + Copy, 24 { 25 flags.clear(); 26 assert_eq!(flags, T::empty(), "{:?}.clear()", flags); 27 }