We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24ece07 commit de2c48cCopy full SHA for de2c48c
src/libstd/bitflags.rs
@@ -207,6 +207,13 @@ mod tests {
207
assert_eq!(FlagABC.bits(), 0x00000111);
208
}
209
210
+ #[test]
211
+ fn test_from_bits() {
212
+ assert!(unsafe { Flags::from_bits(0x00000000) } == Flags::empty());
213
+ assert!(unsafe { Flags::from_bits(0x00000001) } == FlagA);
214
+ assert!(unsafe { Flags::from_bits(0x00000111) } == FlagABC);
215
+ }
216
+
217
#[test]
218
fn test_is_empty(){
219
assert!(Flags::empty().is_empty());
0 commit comments