add non raw array ffi test
This commit is contained in:
parent
d190873f72
commit
2b1d062277
1 changed files with 8 additions and 0 deletions
|
|
@ -95,5 +95,13 @@
|
||||||
{:x {:x 3.0 :y 4.0} :y 3 :w "hello from c"} #(dissoc % :z)
|
{:x {:x 3.0 :y 4.0} :y 3 :w "hello from c"} #(dissoc % :z)
|
||||||
[5 6 7 8] (comp vec :z)))
|
[5 6 7 8] (comp vec :z)))
|
||||||
|
|
||||||
|
(mem/defstruct ComplexTypeWrapped [::Point x ::mem/byte y [::mem/array ::mem/int 4] z ::mem/c-string w] :raw-arrays? false)
|
||||||
|
|
||||||
|
(t/deftest can-call-with-wrapped-complex-defstruct
|
||||||
|
(t/are [x y] (= x (y ((ffi/cfn "complexTypeTest" [::ComplexTypeWrapped] ::ComplexTypeWrapped)
|
||||||
|
(ComplexTypeWrapped. (Point. 2 3) 4 (int-array [5 6 7 8]) "hello from clojure"))))
|
||||||
|
{:x {:x 3.0 :y 4.0} :y 3 :w "hello from c"} #(dissoc % :z)
|
||||||
|
[5 6 7 8] (comp vec :z)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue