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

Function test_new_vertex_creation

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

Source from the content-addressed store, hash-verified

316
317 #[test]
318 fn test_new_vertex_creation() {
319 let hash = Hash::of(b"test");
320 let insertion = Insertion {
321 predecessors: vec![make_position(Some(hash), 0)],
322 successors: vec![],
323 flag: EdgeFlags::BLOCK,
324 start: ChangePosition::new(0),
325 end: ChangePosition::new(10),
326 inode: make_position(Some(hash), 0),
327 };
328
329 assert_eq!(insertion.predecessors.len(), 1);
330 assert!(insertion.successors.is_empty());
331 assert_eq!(insertion.flag, EdgeFlags::BLOCK);
332 }
333
334 #[test]
335 fn test_new_vertex_with_both_contexts() {

Callers

nothing calls this directly

Calls 1

make_positionFunction · 0.70

Tested by

no test coverage detected