Skip to content

Commit

Permalink
Better error message in fuzzing.
Browse files Browse the repository at this point in the history
  • Loading branch information
daemontus committed Sep 18, 2024
1 parent 04dde91 commit 77912f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/_test_bdd/_test_bdd_logic_fuzzing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ fn fuzz_test(num_vars: u16, tree_height: u8, seed: u64) -> bool {
let cnf = eval.to_cnf();
let dnf_o = eval.to_optimized_dnf();

assert!(dnf_o.len() <= dnf.len());
assert!(
dnf_o.len() <= dnf.len(),
"Optimized dnf too large ({} > {}) for {}",
dnf_o.len(),
dnf.len(),
eval.to_boolean_expression(&universe)
);

assert!(universe.mk_dnf(&dnf).iff(&eval).is_true());
assert!(universe.mk_dnf(&dnf_o).iff(&eval).is_true());
Expand Down

0 comments on commit 77912f3

Please sign in to comment.