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

Function test_parent_cycle_terminates

atomic-cli/src/commands/view/list.rs:1069–1080  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1067
1068 #[test]
1069 fn test_parent_cycle_terminates() {
1070 let a = entry("a", Some("b"), 1, "a");
1071 let b = entry("b", Some("a"), 1, "a");
1072 let entries = vec![a, b];
1073
1074 let (visible, _) = compute_visibility(&entries, false);
1075 assert_eq!(visible.len(), 2);
1076
1077 // Must terminate (visited set cuts the a→b→a cycle).
1078 let ordered = tree_order(&entries, &visible);
1079 assert_eq!(ordered.len(), 2);
1080 }
1081
1082 #[test]
1083 fn test_children_sort_alphabetically() {

Callers

nothing calls this directly

Calls 3

compute_visibilityFunction · 0.85
tree_orderFunction · 0.85
entryFunction · 0.70

Tested by

no test coverage detected