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

Function test_new_edge_creation

atomic-core/src/apply/edge.rs:650–663  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

648
649 #[test]
650 fn test_new_edge_creation() {
651 let hash = Hash::of(b"test");
652 let edge = NewEdge {
653 previous: EdgeFlags::BLOCK,
654 flag: EdgeFlags::BLOCK | EdgeFlags::DELETED,
655 from: make_position(Some(hash), 10),
656 to: make_external_vertex(Some(hash), 20, 30),
657 introduced_by: Some(hash),
658 };
659
660 assert_eq!(edge.previous, EdgeFlags::BLOCK);
661 assert!(edge.flag.contains(EdgeFlags::DELETED));
662 assert_eq!(edge.introduced_by, Some(hash));
663 }
664
665 #[test]
666 fn test_new_edge_self_reference() {

Callers

nothing calls this directly

Calls 2

make_positionFunction · 0.70
make_external_vertexFunction · 0.70

Tested by

no test coverage detected