From 8de51316228d9d1c627da45da987d8e79f33f5f9 Mon Sep 17 00:00:00 2001 From: Andrew Cheung Date: Tue, 23 Jul 2024 00:50:20 -0700 Subject: [PATCH] Fix compilation errors --- src/extract/faster_ilp_cbc.rs | 9 +++++---- src/main.rs | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/extract/faster_ilp_cbc.rs b/src/extract/faster_ilp_cbc.rs index 45ad964..d7bf7e3 100644 --- a/src/extract/faster_ilp_cbc.rs +++ b/src/extract/faster_ilp_cbc.rs @@ -1151,11 +1151,12 @@ fn cycle_dfs( } } +#[cfg(test)] mod test { use super::Config; - use crate::{ - faster_ilp_cbc::extract, generate_random_egraph, ELABORATE_TESTING, EPSILON_ALLOWANCE, - }; + use crate::test::{generate_random_egraph, ELABORATE_TESTING}; + + use crate::{faster_ilp_cbc::extract, EPSILON_ALLOWANCE}; use rand::Rng; pub type Cost = ordered_float::NotNan; @@ -1236,7 +1237,7 @@ mod test { for _ in 0..CONFIGS_TO_TEST { configs.push(generate_random_config()); } - test_configs(&configs, crate::test_save_path(stringify!($name))); + test_configs(&configs, crate::test::test_save_path(stringify!($name))); } )* } diff --git a/src/main.rs b/src/main.rs index e3dd1c0..8e4d47c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -93,7 +93,7 @@ fn extractors() -> IndexMap<&'static str, ExtractorDetail> { ( "faster-ilp-cbc", ExtractorDetail { - extractor: extract::faster_ilp_cbc::FasterCbcExtractor::<10>.boxed(), + extractor: extract::faster_ilp_cbc::FasterCbcExtractor.boxed(), optimal: Optimal::DAG, use_for_bench: true, }, @@ -170,4 +170,4 @@ fn main() { } #[cfg(test)] -mod test; +pub mod test;