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

Function test_graph_add_extra_child

atomic-core/src/output/alive/graph.rs:687–699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

685
686 #[test]
687 fn test_graph_add_extra_child() {
688 let mut graph = AliveGraph::new();
689 graph.push_vertex(AliveVertex::DUMMY);
690
691 let v = GraphNode::ROOT;
692 graph.push_vertex(AliveVertex::new(v));
693
694 graph.add_extra_child(VertexId::new(1), None, VertexId::new(5));
695 graph.add_extra_child(VertexId::new(1), None, VertexId::new(6));
696
697 assert_eq!(graph.get_vertex(VertexId::new(1)).extra.len(), 2);
698 assert_eq!(graph.child_count(VertexId::new(1)), 2);
699 }
700
701 #[test]
702 fn test_graph_child_count() {

Callers

nothing calls this directly

Calls 2

push_vertexMethod · 0.80
add_extra_childMethod · 0.80

Tested by

no test coverage detected