MCPcopy Create free account
hub / github.com/bitflags/bitflags / test_complex_operations

Function test_complex_operations

src/tests/bitflags_match.rs:77–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76#[test]
77fn test_complex_operations() {
78 assert_eq!(flag_to_string(Flags::A | (Flags::B & Flags::C)), "A");
79 assert_eq!(
80 flag_to_string((Flags::A | Flags::B) & (Flags::B | Flags::C)),
81 "B"
82 );
83 assert_eq!(
84 flag_to_string(Flags::A ^ (Flags::B | Flags::C)),
85 "A or B or C"
86 );
87}
88
89#[test]
90fn test_empty_and_full_flags() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected