diff --git a/test_files/nam_6_3.rwr b/test_files/nam_6_3.rwr index 0e60c90c..cb7b3b15 100644 Binary files a/test_files/nam_6_3.rwr and b/test_files/nam_6_3.rwr differ diff --git a/test_files/small_eccs.rwr b/test_files/small_eccs.rwr index 3f195e12..1bc83ec6 100644 Binary files a/test_files/small_eccs.rwr and b/test_files/small_eccs.rwr differ diff --git a/tket2-py/tket2/data/nam_6_3.rwr b/tket2-py/tket2/data/nam_6_3.rwr index 0e60c90c..cb7b3b15 100644 Binary files a/tket2-py/tket2/data/nam_6_3.rwr and b/tket2-py/tket2/data/nam_6_3.rwr differ diff --git a/tket2/src/optimiser/badger.rs b/tket2/src/optimiser/badger.rs index 5d632f94..17401208 100644 --- a/tket2/src/optimiser/badger.rs +++ b/tket2/src/optimiser/badger.rs @@ -562,10 +562,16 @@ mod tests { /// A badger optimiser using a reduced set of rewrite rules. #[fixture] - fn badger_opt() -> DefaultBadgerOptimiser { + fn badger_opt_json() -> DefaultBadgerOptimiser { BadgerOptimiser::default_with_eccs_json_file("../test_files/small_eccs.json").unwrap() } + /// A badger optimiser using a reduced set of rewrite rules. + #[fixture] + fn badger_opt_compiled() -> DefaultBadgerOptimiser { + BadgerOptimiser::default_with_rewriter_binary("../test_files/small_eccs.rwr").unwrap() + } + /// A badger optimiser using the complete nam_6_3 rewrite set. /// /// NOTE: This takes a few seconds to load. @@ -576,7 +582,9 @@ mod tests { } #[rstest] - fn rz_rz_cancellation(rz_rz: Circuit, badger_opt: DefaultBadgerOptimiser) { + #[case::compiled(badger_opt_compiled())] + #[case::json(badger_opt_json())] + fn rz_rz_cancellation(rz_rz: Circuit, #[case] badger_opt: DefaultBadgerOptimiser) { let opt_rz = badger_opt.optimise( &rz_rz, BadgerOptions { @@ -589,7 +597,9 @@ mod tests { } #[rstest] - fn rz_rz_cancellation_parallel(rz_rz: Circuit, badger_opt: DefaultBadgerOptimiser) { + #[case::compiled(badger_opt_compiled())] + #[case::json(badger_opt_json())] + fn rz_rz_cancellation_parallel(rz_rz: Circuit, #[case] badger_opt: DefaultBadgerOptimiser) { let mut opt_rz = badger_opt.optimise( &rz_rz, BadgerOptions {