From 6215573925c0a5d47c6c339a1b8031bc58f0ba55 Mon Sep 17 00:00:00 2001 From: Stefan Ellmauthaler Date: Tue, 26 Jul 2022 11:47:51 +0200 Subject: [PATCH] Add better test coverage --- lib/src/adf.rs | 2 +- lib/src/adf/heuristics.rs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/src/adf.rs b/lib/src/adf.rs index 3678f0d..48e7082 100644 --- a/lib/src/adf.rs +++ b/lib/src/adf.rs @@ -1137,7 +1137,7 @@ mod test { vec![vec![Term(0), Term(1)], vec![Term(1), Term(0)]] ); - adf.stable_nogood_channel(Heuristic::Simple, s); + adf.stable_nogood_channel(Heuristic::default(), s); assert_eq!( r.iter().collect::>(), vec![vec![Term(1), Term(0)], vec![Term(0), Term(1)]] diff --git a/lib/src/adf/heuristics.rs b/lib/src/adf/heuristics.rs index e649714..2cbb9f6 100644 --- a/lib/src/adf/heuristics.rs +++ b/lib/src/adf/heuristics.rs @@ -121,3 +121,19 @@ impl Heuristic<'_> { } } } +#[cfg(test)] +mod test { + use super::*; + use crate::datatypes::Term; + use crate::datatypes::Var; + + #[test] + fn debug_out() { + dbg!(Heuristic::Simple); + dbg!(Heuristic::MinModMaxVarImpMinPaths); + dbg!(Heuristic::MinModMinPathsMaxVarImp); + dbg!(Heuristic::Custom(&|_adf: &Adf, + _int: &[Term]| + -> Option<(Var, Term)> { None })); + } +}