()
| 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() { |
nothing calls this directly
no test coverage detected