#![feature(test)]

extern crate test;

#[cfg(test)]
mod tests {
    use syrac_score::{flight::Flight, score::score_flight_on_task, task::Task};
    use test::Bencher;

    #[bench]
    fn bench_score_flight_on_task(b: &mut Bencher) {
        let flight =
            Flight::from_igc_contents(include_str!("../data/2024-pwca-monroe-t3-33.igc")).unwrap();
        let task =
            Task::from_xctsk_contents(include_str!("../data/2024-pwca-monroe-t3.xctsk")).unwrap();
        b.iter(|| score_flight_on_task(&task, &flight));
    }
}
