swig/Examples/test-suite/ocaml/wrapmacro_runme.ml
Zackery Spytz 10d62aecd5 [OCaml] Fix the wrapmacro test
Add a typecheck typemap for size_t and const size_t &.

Add the const qualifier to the typemaps for primitive reference
types.

Add multiple runtime tests.
2019-02-17 01:41:59 -07:00

10 lines
305 B
OCaml

open Swig
open Wrapmacro
let _ =
let args = C_list [ C_int64 2L ; C_int64 1L ] in
assert (_maximum '(args) as int = 2);
let args = C_list [ C_double (2. /. 7.) ; C_double 256. ] in
assert (_maximum '(args) as float = 256.);
assert (_GUINT16_SWAP_LE_BE_CONSTANT '(0x1234) as int = 0x3412);
;;