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

Function test_graph_child_count

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

Source from the content-addressed store, hash-verified

700
701 #[test]
702 fn test_graph_child_count() {
703 let mut graph = AliveGraph::new();
704 graph.push_vertex(AliveVertex::DUMMY);
705
706 let v = GraphNode::ROOT;
707 graph.push_vertex(AliveVertex::new(v));
708 graph.set_last_children_start();
709
710 graph.push_child_to_last(None, VertexId::new(1));
711 graph.push_child_to_last(None, VertexId::new(2));
712 graph.add_extra_child(VertexId::new(1), None, VertexId::new(3));
713
714 assert_eq!(graph.child_count(VertexId::new(1)), 3);
715 }
716
717 // -------------------------------------------------------------------------
718 // Iteration Tests

Callers

nothing calls this directly

Calls 4

push_vertexMethod · 0.80
push_child_to_lastMethod · 0.80
add_extra_childMethod · 0.80

Tested by

no test coverage detected