[OCaml] Runtime tests for template_opaque, using_extend and some others

Add runtime tests for namespace_virtual_method, template_opaque,
using_extend, using_inherit, using_pointers, using_private, and
varargs_overload.
This commit is contained in:
Zackery Spytz 2019-01-27 06:50:51 -07:00
commit f78358d9aa
7 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,24 @@
open Swig
open Using_inherit
let _ =
let b = new_Bar '() in
assert (b -> test (3) as int = 3);
assert (b -> test (3.5) as float = 3.5);
let b = new_Bar2 '() in
assert (b -> test (3) as int = 6);
assert (b -> test (3.5) as float = 7.0);
let b = new_Bar3 '() in
assert (b -> test (3) as int = 6);
assert (b -> test (3.5) as float = 7.0);
let b = new_Bar4 '() in
assert (b -> test (3) as int = 6);
assert (b -> test (3.5) as float = 7.0);
let f = new_Fred1 '() in
assert (f -> test (3) as int = 3);
assert (f -> test (3.5) as float = 7.0);
let f = new_Fred2 '() in
assert (f -> test (3) as int = 3);
assert (f -> test (3.5) as float = 7.0)
;;