#[test]
fn lod_default() {
    let c = phoboss::terrain::lod::LodConfig::default();
    assert!(c.max_level > c.min_level);
}

#[test]
fn lod_level() {
    let c = phoboss::terrain::lod::LodConfig::default();
    let l = phoboss::terrain::lod::lod_level(c, 1_000.0);
    assert!(l >= c.min_level && l <= c.max_level);
}

#[test]
fn mesh_vertex() {
    let p = phoboss::terrain::mesh::SphericalPatch::new(16);
    assert_eq!(p.vertex_count(), 17 * 17);
}

#[test]
fn terrain_material() {
    let m = phoboss::terrain::texturing::material_from_albedo(0.10, false);
    assert_eq!(
        m,
        phoboss::terrain::texturing::TerrainMaterial::DarkRegolith
    );
}

#[test]
fn icy_bright_terrain() {
    let m = phoboss::terrain::texturing::material_from_albedo(0.50, false);
    assert_eq!(m, phoboss::terrain::texturing::TerrainMaterial::IcyBright);
}

#[test]
fn red_unit_terrain() {
    let m = phoboss::terrain::texturing::material_from_albedo(0.05, true);
    assert_eq!(m, phoboss::terrain::texturing::TerrainMaterial::RedUnit);
}
