[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
36
Examples/test-suite/ocaml/special_variables_runme.ml
Normal file
36
Examples/test-suite/ocaml/special_variables_runme.ml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
open Swig
|
||||
open Special_variables
|
||||
|
||||
let _ =
|
||||
assert (_ExceptionVars '(1.0, 2.0) as string =
|
||||
"result = Space::exceptionvars(arg1,arg2); Space::exceptionvars ExceptionVars _wrap_ExceptionVarsspecial_variables ");
|
||||
assert (_overloadedmethod '() as string =
|
||||
"result = Space::overloadedmethod(); Space::overloadedmethod overloadedmethod __SWIG_1 _wrap_overloadedmethod__SWIG_1special_variables ");
|
||||
assert (_overloadedmethod '(10.0) as string =
|
||||
"result = Space::overloadedmethod(arg1); Space::overloadedmethod overloadedmethod __SWIG_0 _wrap_overloadedmethod__SWIG_0special_variables ");
|
||||
|
||||
let _ = new_ABC '(0, 0.0) in
|
||||
assert (_declaration '() as string = "SpaceNamespace::ABC::ABC(int,double) SpaceNamespace::ABC::ABC(int,double)");
|
||||
let a = new_ABC '() in
|
||||
assert (_declaration '() as string = "SpaceNamespace::ABC::ABC() SpaceNamespace::ABC::ABC()");
|
||||
ignore (a -> instancemethod (1));
|
||||
assert (_declaration '() as string = "short * SpaceNamespace::ABC::instancemethod(int) SpaceNamespace::ABC::instancemethod(int)");
|
||||
ignore (a -> instancemethod (1, false));
|
||||
assert (_declaration '() as string = "short * SpaceNamespace::ABC::instancemethod(int,bool) SpaceNamespace::ABC::instancemethod(int,bool)");
|
||||
ignore (a -> constmethod (1));
|
||||
assert (_declaration '() as string = "short * SpaceNamespace::ABC::constmethod(int) const SpaceNamespace::ABC::constmethod(int) const");
|
||||
ignore (_ABC_staticmethod '(0, false));
|
||||
assert (_declaration '() as string = "short * SpaceNamespace::ABC::staticmethod(int,bool) SpaceNamespace::ABC::staticmethod(int,bool)");
|
||||
ignore (a -> "~" ());
|
||||
assert (_declaration '() as string = "SpaceNamespace::ABC::~ABC() SpaceNamespace::ABC::~ABC()");
|
||||
let abc = new_TemplateABC '() in
|
||||
assert (_declaration '() as string = "SpaceNamespace::Template< SpaceNamespace::ABC >::Template() SpaceNamespace::Template< SpaceNamespace::ABC >::Template()");
|
||||
let arg = new_ABC '() in
|
||||
ignore (abc -> tmethod (arg));
|
||||
assert (_declaration '() as string = "std::string SpaceNamespace::Template< SpaceNamespace::ABC >::tmethod(SpaceNamespace::ABC) SpaceNamespace::Template< SpaceNamespace::ABC >::tmethod(SpaceNamespace::ABC)");
|
||||
ignore (abc -> "~" ());
|
||||
assert (_declaration '() as string = "SpaceNamespace::Template< SpaceNamespace::ABC >::~Template() SpaceNamespace::Template< SpaceNamespace::ABC >::~Template()");
|
||||
let arg = new_TemplateABC '() in
|
||||
ignore (_globtemplate (arg));
|
||||
assert (_declaration '() as string = "void SpaceNamespace::globtemplate(SpaceNamespace::Template< SpaceNamespace::ABC >) SpaceNamespace::globtemplate(SpaceNamespace::Template< SpaceNamespace::ABC >)");
|
||||
;;
|
||||
Loading…
Add table
Add a link
Reference in a new issue