From 77912f34456227d824674a4195ef2cfb7adcdef0 Mon Sep 17 00:00:00 2001 From: Samuel Pastva Date: Wed, 18 Sep 2024 10:22:05 +0200 Subject: [PATCH] Better error message in fuzzing. --- src/_test_bdd/_test_bdd_logic_fuzzing.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/_test_bdd/_test_bdd_logic_fuzzing.rs b/src/_test_bdd/_test_bdd_logic_fuzzing.rs index 0b3a65c..c3bedd9 100644 --- a/src/_test_bdd/_test_bdd_logic_fuzzing.rs +++ b/src/_test_bdd/_test_bdd_logic_fuzzing.rs @@ -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());