MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_output_empty_graph

Function test_output_empty_graph

atomic-core/src/output/repo/content.rs:787–808  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

785
786 #[test]
787 fn test_output_empty_graph() {
788 let graph = AliveGraph::new();
789 let order = OrderResult {
790 sccs: Vec::new(),
791 conflict_tree: Default::default(),
792 cyclic_conflicts: 0,
793 forward_edges: Vec::new(),
794 };
795
796 let changes = MemoryChangeStore::new();
797 let hash_fn = |_: NodeId| None;
798
799 let mut buffer = Vec::new();
800 {
801 let pos = Position::ROOT;
802 let mut writer = ConflictWriter::new(&mut buffer, "test.rs", pos);
803
804 let result = output_graph_content(&changes, hash_fn, &graph, &order, &mut writer);
805 assert!(result.is_ok());
806 }
807 assert!(buffer.is_empty());
808 }
809
810 #[test]
811 fn test_output_single_vertex() {

Callers

nothing calls this directly

Calls 1

output_graph_contentFunction · 0.85

Tested by

no test coverage detected