()
| 677 | |
| 678 | #[test] |
| 679 | fn test_graph_child_count() { |
| 680 | let mut graph = AliveGraph::new(); |
| 681 | graph.push_vertex(AliveVertex::DUMMY); |
| 682 | |
| 683 | let v = GraphNode::ROOT; |
| 684 | graph.push_vertex(AliveVertex::new(v)); |
| 685 | graph.set_last_children_start(); |
| 686 | |
| 687 | graph.push_child_to_last(None, VertexId::new(1)); |
| 688 | graph.push_child_to_last(None, VertexId::new(2)); |
| 689 | graph.add_extra_child(VertexId::new(1), None, VertexId::new(3)); |
| 690 | |
| 691 | assert_eq!(graph.child_count(VertexId::new(1)), 3); |
| 692 | } |
| 693 | |
| 694 | // ------------------------------------------------------------------------- |
| 695 | // Iteration Tests |
nothing calls this directly
no test coverage detected