Skip to content

Commit

Permalink
Cleanup and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kkafar committed May 5, 2024
1 parent 9daa62e commit 6592bb4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/ga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<IndividualT, MutOpT, CrossOpT, SelOpT, ReplOpT, PopGenT, FitnessT, ProbeT>
where
IndividualT: IndividualTrait,
Expand Down Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/selection_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 6592bb4

Please sign in to comment.