mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-26 04:03:06 +00:00
test_serialization_roundtrip added
This commit is contained in:
parent
80d7a98c34
commit
3925b42b27
@ -245,4 +245,15 @@ mod tests {
|
||||
let _ = produce_blob_from_fit_slice(&data);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_serialization_roundtrip() {
|
||||
let data = [42u8; PRIVATE_BLOB_SIZE];
|
||||
let blob = PrivateDataBlob::from(data);
|
||||
|
||||
let serialized = serde_json::to_string(&blob).unwrap();
|
||||
let deserialized: PrivateDataBlob = serde_json::from_str(&serialized).unwrap();
|
||||
|
||||
assert_eq!(blob, deserialized);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user