// import module tekanan hidrostatis
use phyrust::config::{Float, EPSILON};
use phyrust::core::hydro_press;
use rstest::rstest;

#[rstest]
#[case(1000.0, 0.5, 4900.0)] // pada kasus normal
#[case(1000.0, 0.0, 0.0)] // pada ketinggian nol

fn test_hydro_press(#[case] density: Float, #[case] height: Float, #[case] expected: Float) {
    let result: Float = hydro_press::hydro_press_formula(density, height);
    assert!(
        (result - expected).abs() < EPSILON,
        "failed at: density={}, height={}, result={}, expect={}",
        density,
        height,
        result,
        expected
    )
}
