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

Function test_file_ops_postcard_roundtrip

atomic-core/src/change/ops.rs:1204–1212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1202
1203 #[test]
1204 fn test_file_ops_postcard_roundtrip() {
1205 let mut ops = FileOps::create(test_trunk_id(), "binary.dat".to_string(), None);
1206 ops.add_line_op(LineOps::delete(test_branch_id(5), vec![]));
1207
1208 let bytes = postcard::to_allocvec(&ops).unwrap();
1209 let deserialized: FileOps = postcard::from_bytes(&bytes).unwrap();
1210
1211 assert_eq!(ops, deserialized);
1212 }
1213}

Callers

nothing calls this directly

Calls 4

test_branch_idFunction · 0.85
test_trunk_idFunction · 0.70
add_line_opMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected