#[test]
fn orbit_new_defaults() {
    let o = deimoss::physics::orbit::DeimosOrbit::new();
    assert!(o.semi_major_axis_m > 2.0e7);
    assert!(o.eccentricity < 0.001);
}

#[test]
fn orbital_period_positive() {
    let o = deimoss::physics::orbit::DeimosOrbit::new();
    assert!(o.orbital_period_s() > 1.0e5);
}

#[test]
fn periapsis_less_than_apoapsis() {
    let o = deimoss::physics::orbit::DeimosOrbit::new();
    assert!(o.periapsis_m() < o.apoapsis_m());
}

#[test]
fn orbital_speed_positive() {
    let o = deimoss::physics::orbit::DeimosOrbit::new();
    let v = o.orbital_speed_m_s(o.semi_major_axis_m);
    assert!(v > 0.0 && v < 5_000.0);
}

#[test]
fn rotation_synchronous() {
    let r = deimoss::physics::rotation::DeimosRotation::new();
    assert!(r.synchronous);
    assert!(r.equatorial_speed_m_s() > 0.0);
}

#[test]
fn tidal_response_current() {
    let t = deimoss::physics::tides::TidalResponse::current();
    assert!(t.love_number > 0.0);
    assert!(t.mean_displacement_m > 0.0);
}

#[test]
fn mars_tidal_acceleration_nonzero() {
    let a = deimoss::physics::tides::mars_tidal_acceleration(0.0);
    assert!(a.abs() > 0.0);
}

#[test]
fn dissipation_power_positive() {
    let t = deimoss::physics::tides::TidalResponse::current();
    assert!(deimoss::physics::tides::dissipation_power_w(t) > 0.0);
}

#[test]
fn micrometeorite_mass_tiny() {
    let m = deimoss::physics::collisions::micrometeorite();
    assert!(m.mass_kg() < 1.0);
    assert!(m.kinetic_energy_j() > 0.0);
}

#[test]
fn voltaire_forming_creates_large_crater() {
    let b = deimoss::physics::collisions::voltaire_forming_impactor();
    assert!(b.transient_crater_diameter_m() > 100.0);
}
