[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:
Zackery Spytz 2019-02-17 01:41:59 -07:00
commit 10d62aecd5
10 changed files with 58 additions and 10 deletions

View file

@ -0,0 +1,15 @@
open Swig
open Global_vars
_init '()
let _ =
assert (_b '() as string = "string b");
assert (_b '("a string value") as string = "a string value");
assert (_b '() as string = "a string value");
assert (_x '() as int = 1234);
assert (_x '(9876) as int = 9876);
assert (_x '() as int = 9876);
assert (_Hi '() as int = 0);
assert (_Hola '() as int = 1);
;;