mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(db): Add tests and fuzz target to BlockNumHash (#130)
* add tests and fuzz target for BlockNumHash * use block 1 for test_block_num_hash * new clippy stds * fmt
This commit is contained in:
@ -39,7 +39,7 @@ impl Command {
|
||||
}
|
||||
Err(error) => {
|
||||
num_of_failed += 1;
|
||||
println!("Test {:?} failed:\n {error}\n", file);
|
||||
println!("Test {file:?} failed:\n {error}\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ mod test {
|
||||
}"#;
|
||||
|
||||
let res = serde_json::from_str::<Test>(test);
|
||||
assert!(res.is_ok(), "Failed to deserialize BlockchainTestData with error: {:?}", res);
|
||||
assert!(res.is_ok(), "Failed to deserialize BlockchainTestData with error: {res:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -360,7 +360,7 @@ mod test {
|
||||
"uncleHash" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
|
||||
}"#;
|
||||
let res = serde_json::from_str::<Header>(test);
|
||||
assert!(res.is_ok(), "Failed to deserialize Header with error: {:?}", res);
|
||||
assert!(res.is_ok(), "Failed to deserialize Header with error: {res:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -386,6 +386,6 @@ mod test {
|
||||
]"#;
|
||||
|
||||
let res = serde_json::from_str::<Vec<Transaction>>(test);
|
||||
assert!(res.is_ok(), "Failed to deserialize transactin with error: {:?}", res);
|
||||
assert!(res.is_ok(), "Failed to deserialize transactin with error: {res:?}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user