#[test]
fn height_profile_min_max() {
    let p = deimoss::surface::heightmaps::HeightProfile::new(vec![10.0, 50.0, 30.0]);
    let (min, max) = p.min_max();
    assert!((min - 10.0).abs() < 1e-9);
    assert!((max - 50.0).abs() < 1e-9);
}

#[test]
fn roughness_index_positive() {
    let p = deimoss::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 15.0]);
    assert!(p.roughness_index() > 0.0);
}

#[test]
fn great_circle_distance_positive() {
    let a = deimoss::surface::mapping::DeimosCoord::new(0.0, 0.0, 0.0);
    let b = deimoss::surface::mapping::DeimosCoord::new(10.0, 10.0, 0.0);
    let d = deimoss::surface::mapping::great_circle_distance_km(a, b);
    assert!(d > 0.0);
}

#[test]
fn antipode_inverts_latitude() {
    let c = deimoss::surface::mapping::DeimosCoord::new(30.0, 60.0, 100.0);
    let a = deimoss::surface::mapping::antipode(c);
    assert!((a.latitude_deg + 30.0).abs() < 1e-9);
}

#[test]
fn zone_equatorial_bulge() {
    let z = deimoss::surface::zones::zone_from_lat_lon(0.0, 0.0);
    assert_eq!(z.zone, deimoss::surface::zones::DeimosZone::EquatorialBulge);
}

#[test]
fn zone_smooth_terrain() {
    let z = deimoss::surface::zones::zone_from_lat_lon(30.0, 60.0);
    assert_eq!(z.zone, deimoss::surface::zones::DeimosZone::SmoothTerrain);
}
