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

Function test_graph_clear

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

Source from the content-addressed store, hash-verified

840
841 #[test]
842 fn test_graph_clear() {
843 let mut graph = AliveGraph::new();
844 graph.push_vertex(AliveVertex::DUMMY);
845
846 let v = GraphNode::new(
847 NodeId::new(1),
848 ChangePosition::new(0),
849 ChangePosition::new(100),
850 );
851 graph.push_vertex(AliveVertex::new(v));
852
853 assert!(!graph.is_empty());
854
855 graph.clear();
856 assert!(graph.is_empty());
857 assert_eq!(graph.total_bytes(), 0);
858 }
859
860 #[test]
861 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