@@ -56,4 +56,26 @@ let exe_suffix = splitext(Base.julia_exename())[2]
56
56
@test abi[" types" ][CVectorPair_Float32[" fields" ][1 ][" type_id" ]][" name" ] == " CVector{Float32}"
57
57
@test abi[" types" ][CVectorPair_Float32[" fields" ][2 ][" type_id" ]][" name" ] == " CVector{Float32}"
58
58
@test CVectorPair_Float32[" size" ] == 32
59
+
60
+ # `CTree{Float64}` should have been exported with the correct info
61
+ @test any (Bool[type[" name" ] == " CTree{Float64}" for type in abi[" types" ]])
62
+ CTree_Float64_id = findfirst (type[" name" ] == " CTree{Float64}" for type in abi[" types" ])
63
+ CTree_Float64 = abi[" types" ][CTree_Float64_id]
64
+ @test length (CTree_Float64[" fields" ]) == 1
65
+ @test CTree_Float64[" fields" ][1 ][" offset" ] == 0
66
+ CVector_CTree_Float64 = abi[" types" ][CTree_Float64[" fields" ][1 ][" type_id" ]]
67
+ @test CVector_CTree_Float64[" name" ] == " CVector{CTree{Float64}}"
68
+ @test CTree_Float64[" size" ] == sizeof (UInt) * 2
69
+
70
+ # `CVector{CTree{Float64}}` should have been exported with the correct info
71
+ @test length (CVector_CTree_Float64[" fields" ]) == 2
72
+ @test CVector_CTree_Float64[" fields" ][1 ][" offset" ] == 0
73
+ @test CVector_CTree_Float64[" fields" ][2 ][" offset" ] == sizeof (UInt)
74
+ @test abi[" types" ][CVector_CTree_float64[" fields" ][1 ][" type_id" ]][" name" ] == " Int32"
75
+ @test abi[" types" ][CVector_CTree_Float64[" fields" ][2 ][" type_id" ]][" name" ] == " Ptr{CTree{Float64}}"
76
+ @test CVector_CTree_Float64[" size" ] == sizeof (UInt) * 2
77
+
78
+ # `Ptr{CTree{Float64}}` should refer (recursively) back to the original type id
79
+ Ptr_CTree_Float64 = abi[" types" ][CVector_CTree_Float64[" fields" ][2 ][" type_id" ]]
80
+ @test Ptr_CTree_Float64[" pointee_type_id" ] == CTree_Float64_id
59
81
end
0 commit comments