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

Function test_new_vertex_creation

atomic-core/src/apply/insertion.rs:397–411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

395
396 #[test]
397 fn test_new_vertex_creation() {
398 let hash = Hash::of(b"test");
399 let insertion = Insertion {
400 predecessors: vec![make_position(Some(hash), 0)],
401 successors: vec![],
402 flag: EdgeFlags::BLOCK,
403 start: ChangePosition::new(0),
404 end: ChangePosition::new(10),
405 inode: make_position(Some(hash), 0),
406 };
407
408 assert_eq!(insertion.predecessors.len(), 1);
409 assert!(insertion.successors.is_empty());
410 assert_eq!(insertion.flag, EdgeFlags::BLOCK);
411 }
412
413 #[test]
414 fn test_new_vertex_with_both_contexts() {

Callers

nothing calls this directly

Calls 1

make_positionFunction · 0.70

Tested by

no test coverage detected