[OCaml] Don't use argout typemaps by default for some reference types
The OCaml module's typemaps.i supplied argout typemaps for some reference types (e.g. int &) by default, which was unintuitive and inconsistent when compared with other modules. The argout_ref example depended on this, so add a typemap to argout_ref/example.i. Add multiple runtime tests that deal with references.
This commit is contained in:
parent
940e32477d
commit
b2d93665fe
8 changed files with 130 additions and 29 deletions
|
|
@ -12,4 +12,15 @@ let _ =
|
|||
assert (_boolfunction '(false) as string = "false");
|
||||
assert (_intfunction '(true) as string = "int");
|
||||
assert (_intfunction '(false) as string = "int");
|
||||
|
||||
assert (_overloaded_ref '(true) as string = "bool");
|
||||
assert (_overloaded_ref '(false) as string = "bool");
|
||||
assert (_overloaded_ref '(0) as string = "int");
|
||||
assert (_overloaded_ref '(1) as string = "int");
|
||||
assert (_overloaded_ref '(2) as string = "int");
|
||||
assert (_overloaded_ref '("1234") as string = "string");
|
||||
assert (_boolfunction_ref '(true) as string = "true");
|
||||
assert (_boolfunction_ref '(false) as string = "false");
|
||||
assert (_intfunction_ref '(true) as string = "int");
|
||||
assert (_intfunction_ref '(false) as string = "int");
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue