use phyrust::config::EPSILON;
use phyrust::core::unit_system::BaseUnits;

#[test]
fn test_base_units_initialization() {
    // mendefinisikan 7 besaran pokok SI
    let units = BaseUnits {
        length: 10.55,       // meter (m)
        mass: 2.00,          // kilogram (kg)
        time: 5.00,          // second (s)
        current: 1.20,       // ampere (A)
        temperature: 300.15, // kelvin (K)
        substance: 1.00,     // mole (mol)
        luminosity: 50.00,   // candela (cd)
    };

    // Validasi presisi sesuai aturan 2 angka di belakang koma (EPSILON 0.01)
    assert!((units.length - 10.55).abs() <= EPSILON);
    assert!((units.temperature - 300.15).abs() <= EPSILON);
}
