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

Function empty_segment

nodedb-vector/src/mmap_segment/reader.rs:566–575  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

564
565 #[test]
566 fn empty_segment() {
567 let dir = tempfile::tempdir().unwrap();
568 let path = dir.path().join("empty.vseg");
569
570 let seg = MmapVectorSegment::create(&path, 3, &[]).unwrap();
571 assert_eq!(seg.count(), 0);
572 assert!(seg.get_vector(0).is_none());
573 assert_eq!(seg.all_vectors_flat().len(), 0);
574 assert_eq!(seg.all_surrogate_ids().len(), 0);
575 }
576
577 #[test]
578 fn footer_golden_layout() {

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
createFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected