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

Function test_graph_clear

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

Source from the content-addressed store, hash-verified

817
818 #[test]
819 fn test_graph_clear() {
820 let mut graph = AliveGraph::new();
821 graph.push_vertex(AliveVertex::DUMMY);
822
823 let v = GraphNode::new(
824 NodeId::new(1),
825 ChangePosition::new(0),
826 ChangePosition::new(100),
827 );
828 graph.push_vertex(AliveVertex::new(v));
829
830 assert!(!graph.is_empty());
831
832 graph.clear();
833 assert!(graph.is_empty());
834 assert_eq!(graph.total_bytes(), 0);
835 }
836
837 #[test]
838 fn test_graph_reset_traversal_state() {

Callers

nothing calls this directly

Calls 2

push_vertexMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected