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

#[test]
fn tuples() {
    assert_eq!(
        (1.1, 2).get_ty_recursive(),
        TyKindMapped::Tuple(vec![
            TyKindMapped::FloatMapped(FloatMapped::F64(1.1)),
            TyKindMapped::IntMapped(IntMapped::I32(2))
        ])
    );
    assert_eq!(
        (1, 2i64).get_ty_recursive(),
        TyKindMapped::Tuple(vec![
            TyKindMapped::IntMapped(IntMapped::I32(1)),
            TyKindMapped::IntMapped(IntMapped::I64(2))
        ])
    )
}

#[test]
fn tuples_recursive() {
    assert_eq!(
        (1u8, (2.2f32, (3, 4.4))).get_ty_recursive(),
        TyKindMapped::Tuple(vec![
            TyKindMapped::IntMapped(IntMapped::U8(1)),
            TyKindMapped::Tuple(vec![
                TyKindMapped::FloatMapped(FloatMapped::F32(2.2)),
                TyKindMapped::Tuple(vec![
                    TyKindMapped::IntMapped(IntMapped::I32(3)),
                    TyKindMapped::FloatMapped(FloatMapped::F64(4.4))
                ])
            ])
        ])
    )
}
