()
| 818 | |
| 819 | #[test] |
| 820 | fn test_output_empty_graph() { |
| 821 | let graph = AliveGraph::new(); |
| 822 | let order = OrderResult { |
| 823 | sccs: Vec::new(), |
| 824 | conflict_tree: Default::default(), |
| 825 | cyclic_conflicts: 0, |
| 826 | forward_edges: Vec::new(), |
| 827 | }; |
| 828 | |
| 829 | let changes = MemoryChangeStore::new(); |
| 830 | let hash_fn = |_: NodeId| None; |
| 831 | |
| 832 | let mut buffer = Vec::new(); |
| 833 | { |
| 834 | let pos = Position::ROOT; |
| 835 | let mut writer = ConflictWriter::new(&mut buffer, "test.rs", pos); |
| 836 | |
| 837 | let result = output_graph_content(&changes, hash_fn, &graph, &order, &mut writer); |
| 838 | assert!(result.is_ok()); |
| 839 | } |
| 840 | assert!(buffer.is_empty()); |
| 841 | } |
| 842 | |
| 843 | #[test] |
| 844 | fn test_output_single_vertex() { |
nothing calls this directly
no test coverage detected