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

Function test_dependency_info_add_dependent

atomic-repository/src/unrecord.rs:885–896  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

883
884 #[test]
885 fn test_dependency_info_add_dependent() {
886 let hash = Hash::of(b"test");
887 let dep = Hash::of(b"dependent");
888 let mut info = UnrecordDependencyInfo::new(hash);
889
890 info.add_dependent(dep);
891
892 assert_eq!(info.dependents.len(), 1);
893 assert!(info.has_dependents());
894 assert!(!info.can_unrecord); // Dependents block unrecord
895 assert!(info.block_reason.is_some());
896 }
897
898 // UnrecordError Tests
899

Callers

nothing calls this directly

Calls 1

add_dependentMethod · 0.80

Tested by

no test coverage detected