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:894–905  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

892
893 #[test]
894 fn test_get_contents_root_vertex() {
895 let store = MemoryChangeStore::new();
896
897 let hash_fn = |_: NodeId| -> Option<Hash> { None };
898
899 // ROOT span should return 0
900 let mut buf = vec![0u8; 10];
901 let n = store
902 .get_contents(hash_fn, GraphNode::ROOT, &mut buf)
903 .unwrap();
904 assert_eq!(n, 0);
905 }
906
907 #[test]
908 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