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

Source from the content-addressed store, hash-verified

662
663 #[test]
664 fn test_graph_add_extra_child() {
665 let mut graph = AliveGraph::new();
666 graph.push_vertex(AliveVertex::DUMMY);
667
668 let v = GraphNode::ROOT;
669 graph.push_vertex(AliveVertex::new(v));
670
671 graph.add_extra_child(VertexId::new(1), None, VertexId::new(5));
672 graph.add_extra_child(VertexId::new(1), None, VertexId::new(6));
673
674 assert_eq!(graph.get_vertex(VertexId::new(1)).extra.len(), 2);
675 assert_eq!(graph.child_count(VertexId::new(1)), 2);
676 }
677
678 #[test]
679 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