From 6592bb4054600f4fd836032cdb5cee880d3222a1 Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Sun, 5 May 2024 15:20:45 +0200 Subject: [PATCH] Cleanup and fix tests --- src/ga.rs | 10 +--------- tests/selection_tests.rs | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/ga.rs b/src/ga.rs index 3e8a51c..58a2159 100644 --- a/src/ga.rs +++ b/src/ga.rs @@ -151,14 +151,6 @@ pub struct GAParams { pub max_duration: std::time::Duration, } -pub struct Telemetry { - -} - -pub struct Instrumentation { - pub telemetry: Telemetry, -} - pub struct GAConfig where IndividualT: IndividualTrait, @@ -399,6 +391,6 @@ mod tests { #[test] fn metrics_can_be_constructed_with_new_fn() { - Metrics::new(None, None, 0); + Metrics::new(None, None, 0, 0); } } diff --git a/tests/selection_tests.rs b/tests/selection_tests.rs index d2a216f..935dd43 100644 --- a/tests/selection_tests.rs +++ b/tests/selection_tests.rs @@ -186,7 +186,7 @@ fn boltzmann_returns_demanded_size() { ); // FIXME: We must add mocking! - let metrics = Metrics::new(Some(std::time::Instant::now()), None, 40); + let metrics = Metrics::new(Some(std::time::Instant::now()), None, 40, expected_population_size); let selected = Boltzmann::new(expected_selection_size, 0.2, 6.0, 300, true).apply(&metrics, &population);