node: More work on encoding

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-09-13 10:16:05 +02:00
parent 1dec499e3d
commit cb4939fd75
6 changed files with 101 additions and 34 deletions
+8
View File
@@ -421,6 +421,14 @@ mod tests {
quickcheck::TestResult::passed()
}
#[quickcheck]
fn prop_vec(input: Vec<String>) {
assert_eq!(
deserialize::<Vec<String>>(&serialize(&input.as_slice())).unwrap(),
input
);
}
#[quickcheck]
fn prop_pubkey(input: PublicKey) {
assert_eq!(deserialize::<PublicKey>(&serialize(&input)).unwrap(), input);