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

Function cases

src/tests/extend.rs:4–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2
3#[test]
4fn cases() {
5 let mut flags = TestFlags::empty();
6
7 flags.extend(TestFlags::A);
8
9 assert_eq!(TestFlags::A, flags);
10
11 flags.extend(TestFlags::A | TestFlags::B | TestFlags::C);
12
13 assert_eq!(TestFlags::ABC, flags);
14
15 flags.extend(TestFlags::from_bits_retain(1 << 5));
16
17 assert_eq!(TestFlags::ABC | TestFlags::from_bits_retain(1 << 5), flags);
18}
19
20mod external {
21 use super::*;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected