[OCaml] Runtime tests for fvirtual, overload_polymorphic and some others
Add runtime tests for conversion, extend_typedef_class, extend_constructor_destructor, fvirtual, overload_polymorphic, template_rename, and using1.
This commit is contained in:
parent
00fbf09137
commit
f71ee5be67
7 changed files with 68 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
open Swig
|
||||
open Extend_constructor_destructor
|
||||
|
||||
let check o v =
|
||||
assert ((o -> "[ivar]" () as int) = v);
|
||||
ignore (o -> "~" ());
|
||||
assert ((_globalVar '() as int) = -v)
|
||||
|
||||
let ctors = [new_AStruct; new_BStruct; new_CStruct; new_DStruct; new_EStruct;
|
||||
new_FStruct; new_GStruct]
|
||||
|
||||
let _ = List.iteri (fun i c -> let j = succ i in check (c (C_int j)) j) ctors
|
||||
Loading…
Add table
Add a link
Reference in a new issue