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

Function test_new_edge_creation

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

Source from the content-addressed store, hash-verified

470
471 #[test]
472 fn test_new_edge_creation() {
473 let hash = Hash::of(b"test");
474 let edge = NewEdge {
475 previous: EdgeFlags::BLOCK,
476 flag: EdgeFlags::BLOCK | EdgeFlags::DELETED,
477 from: make_position(Some(hash), 10),
478 to: make_external_vertex(Some(hash), 20, 30),
479 introduced_by: Some(hash),
480 };
481
482 assert_eq!(edge.previous, EdgeFlags::BLOCK);
483 assert!(edge.flag.contains(EdgeFlags::DELETED));
484 assert_eq!(edge.introduced_by, Some(hash));
485 }
486
487 #[test]
488 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