[OCaml] Add missing INPUT, OUTPUT, and INOUT typemaps for primitives
The typemaps are based on PHP's.
This commit is contained in:
parent
b9350614b5
commit
470ce2dd31
7 changed files with 64 additions and 15 deletions
|
|
@ -34,6 +34,12 @@ FAILING_C_TESTS = \
|
|||
enums \
|
||||
preproc_constants_c \
|
||||
|
||||
CPP_TEST_CASES += \
|
||||
inout \
|
||||
|
||||
C_TEST_CASES += \
|
||||
multivalue \
|
||||
|
||||
ml_runme = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
||||
|
||||
run_testcase = \
|
||||
|
|
|
|||
8
Examples/test-suite/ocaml/inout_runme.ml
Normal file
8
Examples/test-suite/ocaml/inout_runme.ml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
open Swig
|
||||
open Inout
|
||||
|
||||
let _ =
|
||||
assert (_AddOne1 '(1.) as float = 2.);
|
||||
assert (_AddOne3 '(1, 1, 1) = C_list ['2.;'2.;'2.]);
|
||||
assert (_AddOne1r '(1.) as float = 2.);
|
||||
;;
|
||||
8
Examples/test-suite/ocaml/multivalue_runme.ml
Normal file
8
Examples/test-suite/ocaml/multivalue_runme.ml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
open Swig
|
||||
open Multivalue
|
||||
|
||||
let _ =
|
||||
assert (_divide_l '(37, 5) = C_list ['7;'2]);
|
||||
assert (_divide_v '(41, 7) = C_list ['5;'6]);
|
||||
assert (_divide_mv '(91, 13) = C_list ['7;'0]);
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue