MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / roundtrip

Function roundtrip

nodedb-wal/src/tombstone.rs:112–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111 #[test]
112 fn roundtrip() {
113 let p = CollectionTombstonePayload::new("users", 42);
114 let bytes = p.to_bytes().unwrap();
115 assert_eq!(bytes.len(), p.wire_size());
116 let decoded = CollectionTombstonePayload::from_bytes(&bytes).unwrap();
117 assert_eq!(decoded, p);
118 }
119
120 #[test]
121 fn rejects_oversize_name() {

Callers

nothing calls this directly

Calls 1

to_bytesMethod · 0.45

Tested by

no test coverage detected