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

Function three_way_fork

atomic-core/src/output/repo/fork.rs:356–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354
355 #[test]
356 fn three_way_fork() {
357 let verts = [
358 GraphNode::BOTTOM,
359 make_vertex(1, 0, 10),
360 make_vertex(2, 0, 5),
361 make_vertex(3, 0, 7),
362 make_vertex(4, 0, 3),
363 ];
364 let graph = build_graph(&verts, 1, &[2, 3, 4]);
365
366 let order = OrderResult {
367 sccs: vec![
368 vec![VertexId(1)],
369 vec![VertexId(2)],
370 vec![VertexId(3)],
371 vec![VertexId(4)],
372 ],
373 conflict_tree: Default::default(),
374 cyclic_conflicts: 0,
375 forward_edges: Vec::new(),
376 };
377
378 let forks = detect_fork_conflicts(&graph, &order).unwrap();
379 assert_eq!(forks.len(), 1);
380 assert_eq!(forks[0].children.len(), 3);
381 }
382
383 #[test]
384 fn no_children_at_all() {

Callers

nothing calls this directly

Calls 4

build_graphFunction · 0.85
detect_fork_conflictsFunction · 0.85
make_vertexFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected