use kyomu::{FloatMapped, IntMapped, ReflectionRecursive, TyKindMapped};

#[test]
fn floats() {
    assert_eq!(
        1.1f32.get_ty_recursive(),
        TyKindMapped::FloatMapped(FloatMapped::F32(1.1))
    );
    assert_eq!(
        69.69f64.get_ty_recursive(),
        TyKindMapped::FloatMapped(FloatMapped::F64(69.69))
    );
}

#[test]
fn ints() {
    assert_eq!(
        1u8.get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::U8(1))
    );
    assert_eq!(
        1u16.get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::U16(1))
    );
    assert_eq!(
        1u32.get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::U32(1))
    );
    assert_eq!(
        1u64.get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::U64(1))
    );
    assert_eq!(
        1u128.get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::U128(1))
    );
    assert_eq!(
        (-1i8).get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::I8(-1))
    );
    assert_eq!(
        (-1i16).get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::I16(-1))
    );
    assert_eq!(
        (-1i32).get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::I32(-1))
    );
    assert_eq!(
        (-1i64).get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::I64(-1))
    );
    assert_eq!(
        (-1i128).get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::I128(-1))
    );

    assert_eq!(
        1.get_ty_recursive(),
        TyKindMapped::IntMapped(IntMapped::I32(1))
    );
}
