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:1540–1548  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1538
1539 #[test]
1540 fn test_file_ops_postcard_roundtrip() {
1541 let mut ops = FileOps::create(test_trunk_id(), "binary.dat".to_string(), None);
1542 ops.add_line_op(LineOps::delete(test_branch_id(5), vec![]));
1543
1544 let bytes = postcard::to_allocvec(&ops).unwrap();
1545 let deserialized: FileOps = postcard::from_bytes(&bytes).unwrap();
1546
1547 assert_eq!(ops, deserialized);
1548 }
1549}

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected