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

Function cases

src/tests/all_named.rs:6–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5#[test]
6fn cases() {
7 case(1 | 1 << 1 | 1 << 2, TestFlags::all_named);
8
9 case(1 | 1 << 1 | 1 << 2, TestExternal::all_named);
10
11 case(0, TestExternalFull::all_named);
12}
13
14#[track_caller]
15fn case<T: Flags>(expected: T::Bits, inherent: impl FnOnce() -> T)

Callers

nothing calls this directly

Calls 1

caseFunction · 0.70

Tested by

no test coverage detected