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

Source from the content-addressed store, hash-verified

722
723 #[test]
724 fn test_graph_iter_vertices_mut() {
725 let mut graph = AliveGraph::new();
726 graph.push_vertex(AliveVertex::DUMMY);
727 graph.push_vertex(AliveVertex::new(GraphNode::ROOT));
728
729 for (_, vertex) in graph.iter_vertices_mut() {
730 vertex.mark_visited();
731 }
732
733 assert!(graph.get_vertex(VertexId::DUMMY).is_visited());
734 assert!(graph.get_vertex(VertexId::new(1)).is_visited());
735 }
736
737 // -------------------------------------------------------------------------
738 // 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