()
| 774 | |
| 775 | #[test] |
| 776 | fn test_graph_stats_with_content() { |
| 777 | let mut graph = AliveGraph::new(); |
| 778 | graph.push_vertex(AliveVertex::DUMMY); |
| 779 | |
| 780 | let v1 = GraphNode::new( |
| 781 | NodeId::new(1), |
| 782 | ChangePosition::new(0), |
| 783 | ChangePosition::new(100), |
| 784 | ); |
| 785 | graph.push_vertex(AliveVertex::new(v1)); |
| 786 | |
| 787 | let v2 = GraphNode::new( |
| 788 | NodeId::new(2), |
| 789 | ChangePosition::new(0), |
| 790 | ChangePosition::new(50), |
| 791 | ); |
| 792 | graph.push_vertex(AliveVertex::new(v2).with_flags(VertexFlags::ZOMBIE)); |
| 793 | |
| 794 | let stats = graph.stats(); |
| 795 | assert_eq!(stats.vertex_count, 3); |
| 796 | assert_eq!(stats.total_bytes, 150); |
| 797 | assert_eq!(stats.zombie_count, 1); |
| 798 | assert!(stats.has_conflicts()); |
| 799 | } |
| 800 | |
| 801 | #[test] |
| 802 | fn test_graph_stats_avg_calculations() { |
nothing calls this directly
no test coverage detected