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

Function test_serde_bitflags_default

src/external/serde.rs:85–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84 #[test]
85 fn test_serde_bitflags_default() {
86 assert_tokens(&SerdeFlags::empty().readable(), &[Str("")]);
87
88 assert_tokens(&SerdeFlags::empty().compact(), &[U32(0)]);
89
90 assert_tokens(&(SerdeFlags::A | SerdeFlags::B).readable(), &[Str("A | B")]);
91
92 assert_tokens(&(SerdeFlags::A | SerdeFlags::B).compact(), &[U32(1 | 2)]);
93 }
94}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected