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