[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.
This commit is contained in:
parent
6522afe90a
commit
10d62aecd5
10 changed files with 58 additions and 10 deletions
10
Examples/test-suite/ocaml/wrapmacro_runme.ml
Normal file
10
Examples/test-suite/ocaml/wrapmacro_runme.ml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
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);
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue