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

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

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

#[test]
fn terrain_material_chaos() {
    let m = europas::terrain::texturing::material_from_albedo(0.30, true);
    assert_eq!(
        m,
        europas::terrain::texturing::TerrainMaterial::ChaosTerrain
    );
}
