()
| 527 | |
| 528 | #[test] |
| 529 | fn test_graph_vertex_access() { |
| 530 | let mut graph = AliveGraph::new(); |
| 531 | graph.push_vertex(AliveVertex::DUMMY); |
| 532 | |
| 533 | let v = GraphNode::new( |
| 534 | NodeId::new(42), |
| 535 | ChangePosition::new(0), |
| 536 | ChangePosition::new(50), |
| 537 | ); |
| 538 | graph.push_vertex(AliveVertex::new(v)); |
| 539 | |
| 540 | let vertex = graph.get_vertex(VertexId::new(1)); |
| 541 | assert_eq!(vertex.node.change, NodeId::new(42)); |
| 542 | |
| 543 | let vertex_mut = graph.vertex_mut(VertexId::new(1)); |
| 544 | vertex_mut.mark_visited(); |
| 545 | assert!(graph.get_vertex(VertexId::new(1)).is_visited()); |
| 546 | } |
| 547 | |
| 548 | #[test] |
| 549 | fn test_graph_try_get_vertex() { |
nothing calls this directly
no test coverage detected