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

Function test_graph_index_operator

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

Source from the content-addressed store, hash-verified

579
580 #[test]
581 fn test_graph_index_operator() {
582 let mut graph = AliveGraph::new();
583 graph.push_vertex(AliveVertex::DUMMY);
584
585 let v = GraphNode::new(
586 NodeId::new(1),
587 ChangePosition::new(0),
588 ChangePosition::new(10),
589 );
590 graph.push_vertex(AliveVertex::new(v));
591
592 assert!(graph[VertexId::DUMMY].is_dummy());
593 assert_eq!(graph[VertexId::new(1)].len(), 10);
594 }
595
596 #[test]
597 fn test_graph_index_mut_operator() {

Callers

nothing calls this directly

Calls 1

push_vertexMethod · 0.80

Tested by

no test coverage detected