#[test]
fn height_profile_min_max() {
    let hp = titanss::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0]);
    let (min, max) = hp.min_max();
    assert!((min - 5.0).abs() < 1e-10);
    assert!((max - 20.0).abs() < 1e-10);
}

#[test]
fn roughness_index() {
    let hp = titanss::surface::heightmaps::HeightProfile::new(vec![10.0, 20.0, 5.0, 25.0]);
    assert!(hp.roughness_index() > 0.0);
}

#[test]
fn great_circle_distance() {
    let a = titanss::surface::mapping::TitanCoord::new(0.0, 0.0, 0.0);
    let b = titanss::surface::mapping::TitanCoord::new(10.0, 10.0, 0.0);
    assert!(titanss::surface::mapping::great_circle_distance_km(a, b) > 0.0);
}

#[test]
fn antipode() {
    let a = titanss::surface::mapping::TitanCoord::new(15.0, 30.0, 100.0);
    let b = titanss::surface::mapping::antipode(a);
    assert!((b.latitude_deg + 15.0).abs() < 1e-10);
}

#[test]
fn zone_classification() {
    let z = titanss::surface::zones::zone_from_lat_lon(0.0, 0.0);
    assert_eq!(z.zone, titanss::surface::zones::TitanZone::DuneField);
    assert!((z.mean_albedo - 0.15).abs() < 1e-10);
    assert!((z.regolith_depth_m - 50.0).abs() < 1e-10);
}
