Skip to content

Commit f792bbc

Browse files
committed
Remove use of NaN metrics in test
1 parent ab8137f commit f792bbc

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/simulation/investment/appraisal.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,11 @@ mod tests {
869869
/// Test that appraisal outputs with zero capacity are filtered out during sorting.
870870
#[rstest]
871871
fn appraisal_sort_filters_zero_capacity_outputs(asset: Asset) {
872-
let metrics: Vec<Box<dyn MetricTrait>> = vec![
873-
Box::new(LCOXMetric::new(MoneyPerActivity(f64::NAN))),
874-
Box::new(LCOXMetric::new(MoneyPerActivity(f64::NAN))),
875-
Box::new(LCOXMetric::new(MoneyPerActivity(f64::NAN))),
872+
let metric = LCOXMetric::new(MoneyPerActivity(1.0));
873+
let metrics = [
874+
Box::new(metric.clone()),
875+
Box::new(metric.clone()),
876+
Box::new(metric),
876877
];
877878

878879
// Create outputs with zero capacity

0 commit comments

Comments
 (0)