MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_get_contents_root_vertex

Function test_get_contents_root_vertex

atomic-core/src/change/store.rs:870–881  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

868
869 #[test]
870 fn test_get_contents_root_vertex() {
871 let store = MemoryChangeStore::new();
872
873 let hash_fn = |_: NodeId| -> Option<Hash> { None };
874
875 // ROOT span should return 0
876 let mut buf = vec![0u8; 10];
877 let n = store
878 .get_contents(hash_fn, GraphNode::ROOT, &mut buf)
879 .unwrap();
880 assert_eq!(n, 0);
881 }
882
883 #[test]
884 fn test_get_contents_out_of_bounds() {

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.45
get_contentsMethod · 0.45

Tested by

no test coverage detected