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

Function test_new_vertex_json_roundtrip

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

Source from the content-addressed store, hash-verified

650
651 #[test]
652 fn test_new_vertex_json_roundtrip() {
653 let nv = Insertion {
654 predecessors: vec![test_hash_position(0)],
655 successors: vec![],
656 flag: EdgeFlags::BLOCK,
657 start: ChangePosition::new(0),
658 end: ChangePosition::new(10),
659 inode: test_hash_position(0),
660 };
661
662 let json = serde_json::to_string(&nv).unwrap();
663 let parsed: Insertion<Hash> = serde_json::from_str(&json).unwrap();
664 assert_eq!(nv, parsed);
665 }
666
667 #[test]
668 fn test_new_vertex_postcard_roundtrip() {

Callers

nothing calls this directly

Calls 2

test_hash_positionFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected