Added some tests to mimic the ones in the python directory. Working my
way through the alphabet. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4519 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
edd3bac431
commit
ae635218f2
4 changed files with 24 additions and 180 deletions
|
|
@ -1,180 +0,0 @@
|
||||||
Failed:
|
|
||||||
template_typedef_import.multicpptest
|
|
||||||
Success:
|
|
||||||
template_specialization.cpptest
|
|
||||||
default_cast.cpptest
|
|
||||||
import_nomodule.cpptest
|
|
||||||
struct_value.cpptest
|
|
||||||
abstract_inherit.cpptest
|
|
||||||
abstract_inherit_ok.cpptest
|
|
||||||
add_link.cpptest
|
|
||||||
anonymous_arg.cpptest
|
|
||||||
argout.cpptest
|
|
||||||
arrays_global.cpptest
|
|
||||||
arrays_global_twodim.cpptest
|
|
||||||
arrays_scope.cpptest
|
|
||||||
bool_default.cpptest
|
|
||||||
casts.cpptest
|
|
||||||
class_ignore.cpptest
|
|
||||||
const_const_2.cpptest
|
|
||||||
constant_pointers.cpptest
|
|
||||||
constover.cpptest
|
|
||||||
constructor_exception.cpptest
|
|
||||||
constructor_explicit.cpptest
|
|
||||||
constructor_value.cpptest
|
|
||||||
conversion.cpptest
|
|
||||||
conversion_namespace.cpptest
|
|
||||||
conversion_ns_template.cpptest
|
|
||||||
cplusplus_throw.cpptest
|
|
||||||
cpp_enum.cpptest
|
|
||||||
cpp_enum_scope.cpptest
|
|
||||||
cpp_namespace.cpptest
|
|
||||||
cpp_nodefault.cpptest
|
|
||||||
cpp_static.cpptest
|
|
||||||
cpp_typedef.cpptest
|
|
||||||
default_constructor.cpptest
|
|
||||||
default_ns.cpptest
|
|
||||||
default_ref.cpptest
|
|
||||||
dynamic_cast.cpptest
|
|
||||||
enum_scope.cpptest
|
|
||||||
enum_scope_template.cpptest
|
|
||||||
enum_var.cpptest
|
|
||||||
evil_diamond.cpptest
|
|
||||||
evil_diamond_ns.cpptest
|
|
||||||
evil_diamond_prop.cpptest
|
|
||||||
explicit.cpptest
|
|
||||||
extend_template.cpptest
|
|
||||||
extend_template_ns.cpptest
|
|
||||||
grouping.cpptest
|
|
||||||
ignore_parameter.cpptest
|
|
||||||
inherit_missing.cpptest
|
|
||||||
kind.cpptest
|
|
||||||
lib_carrays.cpptest
|
|
||||||
lib_cdata.cpptest
|
|
||||||
lib_cpointer.cpptest
|
|
||||||
lib_std_deque.cpptest
|
|
||||||
lib_std_string.cpptest
|
|
||||||
lib_std_vector.cpptest
|
|
||||||
lib_typemaps.cpptest
|
|
||||||
member_template.cpptest
|
|
||||||
minherit.cpptest
|
|
||||||
name_cxx.cpptest
|
|
||||||
name_inherit.cpptest
|
|
||||||
namespace_enum.cpptest
|
|
||||||
namespace_extend.cpptest
|
|
||||||
namespace_template.cpptest
|
|
||||||
namespace_typemap.cpptest
|
|
||||||
newobject1.cpptest
|
|
||||||
overload_complicated.cpptest
|
|
||||||
overload_copy.cpptest
|
|
||||||
overload_extend.cpptest
|
|
||||||
overload_simple.cpptest
|
|
||||||
overload_subtype.cpptest
|
|
||||||
overload_template.cpptest
|
|
||||||
pointer_reference.cpptest
|
|
||||||
primitive_ref.cpptest
|
|
||||||
private_assign.cpptest
|
|
||||||
pure_virtual.cpptest
|
|
||||||
rename_default.cpptest
|
|
||||||
rename_scope.cpptest
|
|
||||||
return_value_scope.cpptest
|
|
||||||
rname.cpptest
|
|
||||||
smart_pointer_const.cpptest
|
|
||||||
smart_pointer_multi.cpptest
|
|
||||||
smart_pointer_multi_typedef.cpptest
|
|
||||||
smart_pointer_not.cpptest
|
|
||||||
smart_pointer_overload.cpptest
|
|
||||||
smart_pointer_protected.cpptest
|
|
||||||
smart_pointer_rename.cpptest
|
|
||||||
smart_pointer_simple.cpptest
|
|
||||||
smart_pointer_typedef.cpptest
|
|
||||||
static_array_member.cpptest
|
|
||||||
static_const_member.cpptest
|
|
||||||
static_const_member_2.cpptest
|
|
||||||
template.cpptest
|
|
||||||
template_arg_scope.cpptest
|
|
||||||
template_arg_typename.cpptest
|
|
||||||
template_base_template.cpptest
|
|
||||||
template_classes.cpptest
|
|
||||||
template_const_ref.cpptest
|
|
||||||
template_construct.cpptest
|
|
||||||
template_default.cpptest
|
|
||||||
template_default2.cpptest
|
|
||||||
template_default_inherit.cpptest
|
|
||||||
template_default_qualify.cpptest
|
|
||||||
template_enum.cpptest
|
|
||||||
template_enum_ns_inherit.cpptest
|
|
||||||
template_enum_typedef.cpptest
|
|
||||||
template_forward.cpptest
|
|
||||||
template_inherit.cpptest
|
|
||||||
template_inherit_abstract.cpptest
|
|
||||||
template_int_const.cpptest
|
|
||||||
template_ns.cpptest
|
|
||||||
template_ns2.cpptest
|
|
||||||
template_ns3.cpptest
|
|
||||||
template_ns4.cpptest
|
|
||||||
template_ns_enum.cpptest
|
|
||||||
template_ns_enum2.cpptest
|
|
||||||
template_ns_inherit.cpptest
|
|
||||||
template_ns_scope.cpptest
|
|
||||||
template_qualifier.cpptest
|
|
||||||
template_rename.cpptest
|
|
||||||
template_retvalue.cpptest
|
|
||||||
template_static.cpptest
|
|
||||||
template_tbase_template.cpptest
|
|
||||||
template_type_namespace.cpptest
|
|
||||||
template_typedef.cpptest
|
|
||||||
template_typedef_cplx.cpptest
|
|
||||||
template_typedef_cplx2.cpptest
|
|
||||||
template_typedef_cplx3.cpptest
|
|
||||||
template_typedef_cplx4.cpptest
|
|
||||||
template_virtual.cpptest
|
|
||||||
template_whitespace.cpptest
|
|
||||||
throw_exception.cpptest
|
|
||||||
typedef_funcptr.cpptest
|
|
||||||
typedef_inherit.cpptest
|
|
||||||
typedef_mptr.cpptest
|
|
||||||
typedef_reference.cpptest
|
|
||||||
typedef_scope.cpptest
|
|
||||||
typemap_namespace.cpptest
|
|
||||||
typemap_ns_using.cpptest
|
|
||||||
typename.cpptest
|
|
||||||
union_scope.cpptest
|
|
||||||
using1.cpptest
|
|
||||||
using2.cpptest
|
|
||||||
using_composition.cpptest
|
|
||||||
using_extend.cpptest
|
|
||||||
using_inherit.cpptest
|
|
||||||
using_private.cpptest
|
|
||||||
using_protected.cpptest
|
|
||||||
valuewrapper_base.cpptest
|
|
||||||
virtual_destructor.cpptest
|
|
||||||
voidtest.cpptest
|
|
||||||
arrayptr.ctest
|
|
||||||
arrays.ctest
|
|
||||||
char_constant.ctest
|
|
||||||
const_const.ctest
|
|
||||||
defineop.ctest
|
|
||||||
defines.ctest
|
|
||||||
enum.ctest
|
|
||||||
lib_carrays.ctest
|
|
||||||
lib_cdata.ctest
|
|
||||||
lib_cmalloc.ctest
|
|
||||||
lib_constraints.ctest
|
|
||||||
lib_cpointer.ctest
|
|
||||||
lib_math.ctest
|
|
||||||
long_long.ctest
|
|
||||||
macro_2.ctest
|
|
||||||
name.ctest
|
|
||||||
nested.ctest
|
|
||||||
newobject2.ctest
|
|
||||||
overload_extendc.ctest
|
|
||||||
preproc_1.ctest
|
|
||||||
preproc_2.ctest
|
|
||||||
preproc_3.ctest
|
|
||||||
ret_by_value.ctest
|
|
||||||
sizeof_pointer.ctest
|
|
||||||
sneaky1.ctest
|
|
||||||
typemap_subst.ctest
|
|
||||||
unions.ctest
|
|
||||||
imports.multicpptest
|
|
||||||
7
SWIG/Examples/test-suite/ocaml/using_protected_runme.ml
Normal file
7
SWIG/Examples/test-suite/ocaml/using_protected_runme.ml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
open Using_protected
|
||||||
|
|
||||||
|
let f = new_FooBar C_void
|
||||||
|
let _ = (invoke f) "x" (C_int 3)
|
||||||
|
|
||||||
|
let _ = if (invoke f) "blah" (C_int 4) <> (C_int 4) then
|
||||||
|
raise (Failure "blah(int)")
|
||||||
10
SWIG/Examples/test-suite/ocaml/varargs_runme.ml
Normal file
10
SWIG/Examples/test-suite/ocaml/varargs_runme.ml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
(* Test case stolen from the python directory *)
|
||||||
|
|
||||||
|
open Varargs
|
||||||
|
|
||||||
|
let _ = if _test (C_string "Hello") <> (C_string "Hello") then
|
||||||
|
raise (Failure "1")
|
||||||
|
|
||||||
|
let f = new_Foo C_void
|
||||||
|
let _ = if (invoke f) "test" (C_string "Hello") <> (C_string "Hello") then
|
||||||
|
raise (Failure "2")
|
||||||
7
SWIG/Examples/test-suite/ocaml/voidtest_runme.ml
Normal file
7
SWIG/Examples/test-suite/ocaml/voidtest_runme.ml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
open Voidtest
|
||||||
|
|
||||||
|
let _ = _globalfunc C_void
|
||||||
|
let f = new_Foo C_void
|
||||||
|
let _ = (invoke f) "memberfunc" C_void
|
||||||
|
|
||||||
|
let _ = _Foo_staticmemberfunc C_void
|
||||||
Loading…
Add table
Add a link
Reference in a new issue