()
| 635 | |
| 636 | #[test] |
| 637 | fn test_graph_children_iterator() { |
| 638 | let mut graph = AliveGraph::new(); |
| 639 | graph.push_vertex(AliveVertex::DUMMY); |
| 640 | |
| 641 | let v = GraphNode::new( |
| 642 | NodeId::new(1), |
| 643 | ChangePosition::new(0), |
| 644 | ChangePosition::new(10), |
| 645 | ); |
| 646 | graph.push_vertex(AliveVertex::new(v)); |
| 647 | graph.set_last_children_start(); |
| 648 | |
| 649 | let edge = SerializedGraphEdge::new( |
| 650 | EdgeFlags::BLOCK, |
| 651 | Position::new(NodeId::new(2), ChangePosition::new(0)), |
| 652 | NodeId::new(1), |
| 653 | ); |
| 654 | graph.push_child_to_last(Some(edge), VertexId::new(2)); |
| 655 | graph.push_child_to_last(None, VertexId::DUMMY); |
| 656 | |
| 657 | let children: Vec<_> = graph.children(VertexId::new(1)).collect(); |
| 658 | assert_eq!(children.len(), 2); |
| 659 | assert!(children[0].0.is_some()); |
| 660 | assert!(children[1].0.is_none()); |
| 661 | } |
| 662 | |
| 663 | #[test] |
| 664 | fn test_graph_get_child() { |
nothing calls this directly
no test coverage detected