Skip to content

Commit

Permalink
Fix formatting in proptest macros
Browse files Browse the repository at this point in the history
  • Loading branch information
upbqdn committed Feb 8, 2024
1 parent 20bd156 commit 17f960d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions zebra-chain/src/work/tests/prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ fn equihash_solution_roundtrip() {
let _init_guard = zebra_test::init();

proptest!(|(solution in any::<equihash::Solution>())| {
let data = solution
.zcash_serialize_to_vec()
.expect("randomized EquihashSolution should serialize");
let solution2 = data
.zcash_deserialize_into()
.expect("randomized EquihashSolution should deserialize");

prop_assert_eq![solution, solution2];
});
let data = solution
.zcash_serialize_to_vec()
.expect("randomized EquihashSolution should serialize");
let solution2 = data
.zcash_deserialize_into()
.expect("randomized EquihashSolution should deserialize");

prop_assert_eq![solution, solution2];
});
}

prop_compose! {
Expand Down Expand Up @@ -94,10 +94,10 @@ fn equihash_prop_test_nonce() -> color_eyre::eyre::Result<()> {
block.header.solution.check(&block.header)?;

proptest!(|(fake_header in randomized_nonce(*block.header.as_ref()))| {
fake_header.solution
.check(&fake_header)
.expect_err("block header should not validate on randomized nonce");
});
fake_header.solution
.check(&fake_header)
.expect_err("block header should not validate on randomized nonce");
});
}

Ok(())
Expand Down

0 comments on commit 17f960d

Please sign in to comment.