()
| 508 | |
| 509 | #[test] |
| 510 | fn test_graph_push_vertex() { |
| 511 | let mut graph = AliveGraph::new(); |
| 512 | |
| 513 | let id = graph.push_vertex(AliveVertex::DUMMY); |
| 514 | assert_eq!(id, VertexId::DUMMY); |
| 515 | assert_eq!(graph.len_vertices(), 1); |
| 516 | |
| 517 | let v = GraphNode::new( |
| 518 | NodeId::new(1), |
| 519 | ChangePosition::new(0), |
| 520 | ChangePosition::new(100), |
| 521 | ); |
| 522 | let id2 = graph.push_vertex(AliveVertex::new(v)); |
| 523 | assert_eq!(id2, VertexId::new(1)); |
| 524 | assert_eq!(graph.len_vertices(), 2); |
| 525 | assert_eq!(graph.total_bytes(), 100); |
| 526 | } |
| 527 | |
| 528 | #[test] |
| 529 | fn test_graph_vertex_access() { |
nothing calls this directly
no test coverage detected