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:939–960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

937
938 #[test]
939 fn test_output_empty_graph() {
940 let graph = AliveGraph::new();
941 let order = OrderResult {
942 sccs: Vec::new(),
943 conflict_tree: Default::default(),
944 cyclic_conflicts: 0,
945 forward_edges: Vec::new(),
946 };
947
948 let changes = MemoryChangeStore::new();
949 let hash_fn = |_: NodeId| Ok(None);
950
951 let mut buffer = Vec::new();
952 {
953 let pos = Position::ROOT;
954 let mut writer = ConflictWriter::new(&mut buffer, "test.rs", pos);
955
956 let result = output_graph_content(&changes, hash_fn, &graph, &order, &mut writer);
957 assert!(result.is_ok());
958 }
959 assert!(buffer.is_empty());
960 }
961
962 #[test]
963 fn test_output_single_vertex() {

Callers

nothing calls this directly

Calls 1

output_graph_contentFunction · 0.85

Tested by

no test coverage detected