// import modul energi kinetic dan rstest
use phyrust::config::{Float, EPSILON};
use phyrust::core::kinetic_energy;
use rstest::rstest;

#[rstest]
#[case(10.0, 2.0, 20.0)] // pada kasus normal
#[case(0.0, 2.0, 0.0)] // pada kasus massa sama dengan 0

fn test_kinetic_scenarios(#[case] m: Float, #[case] v: Float, #[case] expected: Float) {
    let result: Float = kinetic_energy::kinetic_energy_formula(m, v);
    assert!(
        (result - expected).abs() < EPSILON,
        "failed at: m={}, v={}, result={}, expect={}",
        m,
        v,
        result,
        expected
    );
}
