()
| 898 | |
| 899 | #[test] |
| 900 | fn test_graph_children_with_extra() { |
| 901 | let mut graph = AliveGraph::new(); |
| 902 | graph.push_vertex(AliveVertex::DUMMY); |
| 903 | |
| 904 | let v = GraphNode::ROOT; |
| 905 | graph.push_vertex(AliveVertex::new(v)); |
| 906 | graph.set_last_children_start(); |
| 907 | |
| 908 | // Regular children |
| 909 | graph.push_child_to_last(None, VertexId::new(10)); |
| 910 | |
| 911 | // Extra children |
| 912 | graph.add_extra_child(VertexId::new(1), None, VertexId::new(20)); |
| 913 | graph.add_extra_child(VertexId::new(1), None, VertexId::new(21)); |
| 914 | |
| 915 | // Iterate all children |
| 916 | let children: Vec<_> = graph.children(VertexId::new(1)).collect(); |
| 917 | assert_eq!(children.len(), 3); |
| 918 | } |
| 919 | |
| 920 | #[test] |
| 921 | fn test_graph_debug() { |
nothing calls this directly
no test coverage detected