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

Source from the content-addressed store, hash-verified

531
532 #[test]
533 fn test_graph_push_vertex() {
534 let mut graph = AliveGraph::new();
535
536 let id = graph.push_vertex(AliveVertex::DUMMY);
537 assert_eq!(id, VertexId::DUMMY);
538 assert_eq!(graph.len_vertices(), 1);
539
540 let v = GraphNode::new(
541 NodeId::new(1),
542 ChangePosition::new(0),
543 ChangePosition::new(100),
544 );
545 let id2 = graph.push_vertex(AliveVertex::new(v));
546 assert_eq!(id2, VertexId::new(1));
547 assert_eq!(graph.len_vertices(), 2);
548 assert_eq!(graph.total_bytes(), 100);
549 }
550
551 #[test]
552 fn test_graph_vertex_access() {

Callers

nothing calls this directly

Calls 1

push_vertexMethod · 0.80

Tested by

no test coverage detected