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

Function test_graph_iter_vertices_mut

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

Source from the content-addressed store, hash-verified

745
746 #[test]
747 fn test_graph_iter_vertices_mut() {
748 let mut graph = AliveGraph::new();
749 graph.push_vertex(AliveVertex::DUMMY);
750 graph.push_vertex(AliveVertex::new(GraphNode::ROOT));
751
752 for (_, vertex) in graph.iter_vertices_mut() {
753 vertex.mark_visited();
754 }
755
756 assert!(graph.get_vertex(VertexId::DUMMY).is_visited());
757 assert!(graph.get_vertex(VertexId::new(1)).is_visited());
758 }
759
760 // -------------------------------------------------------------------------
761 // Statistics Tests

Callers

nothing calls this directly

Calls 3

push_vertexMethod · 0.80
iter_vertices_mutMethod · 0.80
mark_visitedMethod · 0.80

Tested by

no test coverage detected