[OCaml] Add a typecheck typemap for SWIGTYPE
This fixes many of the remaining warnings in the OCaml test suite. Add multiple runtime tests.
This commit is contained in:
parent
6522afe90a
commit
b7a400f991
8 changed files with 211 additions and 10 deletions
|
|
@ -0,0 +1,17 @@
|
|||
open Swig
|
||||
open Template_default_arg_overloaded_extend
|
||||
|
||||
let _ =
|
||||
let rs = new_ResultSet '() and sp = new_SearchPoint '() in
|
||||
assert (rs -> go_get_method (0, sp) as int = -1);
|
||||
assert (rs -> go_get_method (0, sp, 100) as int = 100);
|
||||
assert (rs -> go_get_template (0, sp) as int = -2);
|
||||
assert (rs -> go_get_template (0, sp, 100) as int = 100);
|
||||
|
||||
assert (rs -> over () as string = "over(int)");
|
||||
assert (rs -> over (10) as string = "over(int)");
|
||||
assert (rs -> over (sp) as string = "over(giai2::SearchPoint, int)");
|
||||
assert (rs -> over (sp, 10) as string = "over(giai2::SearchPoint, int)");
|
||||
assert (rs -> over (true, sp) as string = "over(bool, gaia2::SearchPoint, int)");
|
||||
assert (rs -> over (true, sp, 10) as string = "over(bool, gaia2::SearchPoint, int)");
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue