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/flags.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 / flags.rs` 46 lines ยท 901 bytes Raw Blame History 1 use super::*; 2 3 use crate::Flags; 4 5 #[test] 6 fn cases() { 7 let flags = TestFlags::FLAGS 8 .iter() 9 .map(|flag| (flag.name(), flag.value().bits())) 10 .collect::>(); 11 12 assert_eq!( 13 vec![ 14 ("A", 1u8), 15 ("B", 1 << 1), 16 ("C", 1 << 2), 17 ("ABC", 1 | 1 << 1 | 1 << 2), 18 ], 19 flags, 20 ); 21 22 assert_eq!(0, TestEmpty::FLAGS.iter().count()); 23 } 24 25 mod external { 26 use super::*; 27 28 #[test] 29 fn cases() { 30 let flags = TestExternal::FLAGS 31 .iter() 32 .map(|flag| (flag.name(), flag.value().bits())) 33 .collect::>(); 34 35 assert_eq!( 36 vec![ 37 ("A", 1u8), 38 ("B", 1 << 1), 39 ("C", 1 << 2), 40 ("ABC", 1 | 1 << 1 | 1 << 2), 41 ("", !0), 42 ], 43 flags, 44 ); 45 } 46 }