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

Function test_edge_map_concat

atomic-core/src/change/atom.rs:717–739  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

715
716 #[test]
717 fn test_edge_map_concat() {
718 let inode = test_hash_position(42);
719 let mut em1 = EdgeUpdate::<Hash>::new(inode);
720 let mut em2 = EdgeUpdate::<Hash>::new(inode);
721
722 let edge = NewEdge {
723 previous: EdgeFlags::BLOCK,
724 flag: EdgeFlags::BLOCK | EdgeFlags::DELETED,
725 from: test_hash_position(0),
726 to: GraphNode::new(
727 Hash::of(b"test"),
728 ChangePosition::new(0),
729 ChangePosition::new(10),
730 ),
731 introduced_by: Hash::of(b"intro"),
732 };
733
734 em1.push(edge.clone());
735 em2.push(edge);
736
737 em1.concat(&em2);
738 assert_eq!(em1.len(), 2);
739 }
740
741 #[test]
742 fn test_edge_map_display() {

Callers

nothing calls this directly

Calls 4

concatMethod · 0.80
test_hash_positionFunction · 0.70
pushMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected