[OCaml] Runtime tests for inctest, li_cpointer_cpp and some others
Add runtime tests for inctest, li_cpointer_cpp, newobject2, special_variables, special_variable_macros, template_extend1, and template_extend2.
This commit is contained in:
parent
7118e4ef1e
commit
4d54d305fc
7 changed files with 99 additions and 0 deletions
16
Examples/test-suite/ocaml/newobject2_runme.ml
Normal file
16
Examples/test-suite/ocaml/newobject2_runme.ml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
open Swig
|
||||
open Newobject2
|
||||
|
||||
let _ =
|
||||
assert (_fooCount '() as int = 0);
|
||||
let foo1 = _makeFoo '() in
|
||||
assert (_fooCount '() as int = 1);
|
||||
assert (_do_stuff '(foo1) = C_void);
|
||||
let foo2 = _makeFoo '() in
|
||||
assert (_fooCount '() as int = 2);
|
||||
assert (_do_stuff '(foo2) = C_void);
|
||||
ignore (foo1 -> "~" ());
|
||||
assert (_fooCount '() as int = 1);
|
||||
ignore (foo2 -> "~" ());
|
||||
assert (_fooCount '() as int = 0)
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue