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

Function empty_snapshot_roundtrip

nodedb/src/data/snapshot.rs:177–184  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176 #[test]
177 fn empty_snapshot_roundtrip() {
178 let snap = CoreSnapshot::empty();
179 let bytes = snap.to_bytes().unwrap();
180 let decoded = CoreSnapshot::from_bytes(&bytes).unwrap();
181 assert_eq!(decoded.watermark, 0);
182 assert!(decoded.sparse_documents.is_empty());
183 assert!(decoded.hnsw_indexes.is_empty());
184 }
185
186 #[test]
187 fn snapshot_with_data_roundtrip() {

Callers

nothing calls this directly

Calls 2

emptyFunction · 0.50
to_bytesMethod · 0.45

Tested by

no test coverage detected