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

Function test_trunk_value_encoding_roundtrip

atomic-core/src/crdt/tables.rs:1117–1128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1115
1116 #[test]
1117 fn test_trunk_value_encoding_roundtrip() {
1118 let data = SerializedTrunk {
1119 inode: Inode::new(42),
1120 state: TrunkState::Alive,
1121 encoding: encoding::UTF8,
1122 path: "src/main.rs".to_string(),
1123 };
1124
1125 let bytes = encode_trunk_value(&data);
1126 let decoded = decode_trunk_value(&bytes).expect("decode failed");
1127 assert_eq!(data, decoded);
1128 }
1129
1130 #[test]
1131 fn test_trunk_value_encoding_empty_path() {

Callers

nothing calls this directly

Calls 2

encode_trunk_valueFunction · 0.85
decode_trunk_valueFunction · 0.85

Tested by

no test coverage detected