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

Function test_graph_push_vertex

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

Source from the content-addressed store, hash-verified

508
509 #[test]
510 fn test_graph_push_vertex() {
511 let mut graph = AliveGraph::new();
512
513 let id = graph.push_vertex(AliveVertex::DUMMY);
514 assert_eq!(id, VertexId::DUMMY);
515 assert_eq!(graph.len_vertices(), 1);
516
517 let v = GraphNode::new(
518 NodeId::new(1),
519 ChangePosition::new(0),
520 ChangePosition::new(100),
521 );
522 let id2 = graph.push_vertex(AliveVertex::new(v));
523 assert_eq!(id2, VertexId::new(1));
524 assert_eq!(graph.len_vertices(), 2);
525 assert_eq!(graph.total_bytes(), 100);
526 }
527
528 #[test]
529 fn test_graph_vertex_access() {

Callers

nothing calls this directly

Calls 1

push_vertexMethod · 0.80

Tested by

no test coverage detected