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

#[test]
fn arrays() {
    assert_eq!(
        [0u8, 1u8].get_ty_recursive(),
        TyKindMapped::Array(vec![
            TyKindMapped::IntMapped(IntMapped::U8(0)),
            TyKindMapped::IntMapped(IntMapped::U8(1))
        ])
    );
    assert_eq!(
        [2.2f32, 3.3f32].get_ty_recursive(),
        TyKindMapped::Array(vec![
            TyKindMapped::FloatMapped(FloatMapped::F32(2.2)),
            TyKindMapped::FloatMapped(FloatMapped::F32(3.3))
        ])
    );
    assert_eq!(
        [[1, 2, 3], [4, 5, 6]].get_ty_recursive(),
        TyKindMapped::Array(vec![
            TyKindMapped::Array(vec![
                TyKindMapped::IntMapped(IntMapped::I32(1)),
                TyKindMapped::IntMapped(IntMapped::I32(2)),
                TyKindMapped::IntMapped(IntMapped::I32(3))
            ]),
            TyKindMapped::Array(vec![
                TyKindMapped::IntMapped(IntMapped::I32(4)),
                TyKindMapped::IntMapped(IntMapped::I32(5)),
                TyKindMapped::IntMapped(IntMapped::I32(6))
            ]),
        ])
    )
}
