From 75808b52ea58a6dcf7948cc0945bdac903507f2f Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Sat, 25 Oct 2003 21:17:06 +0000 Subject: [PATCH] Changed test cases to open Swig. Changed test case runme line a bit to link swig.cmo. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5207 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/ocaml/Makefile.in | 2 +- .../test-suite/ocaml/class_ignore_runme.ml | 1 + .../test-suite/ocaml/minherit_runme.ml | 1 + SWIG/Examples/test-suite/ocaml/name_runme.ml | 1 + .../test-suite/ocaml/newobject1_runme.ml | 1 + .../test-suite/ocaml/overload_copy_runme.ml | 1 + SWIG/Examples/test-suite/ocaml/results | 232 ------------------ .../test-suite/ocaml/sneaky1_runme.ml | 1 + .../test-suite/ocaml/throw_exception_runme.ml | 1 + .../test-suite/ocaml/typedef_mptr_runme.ml | 1 + .../test-suite/ocaml/typename_runme.ml | 1 + .../Examples/test-suite/ocaml/unions_runme.ml | 1 + .../test-suite/ocaml/using_protected_runme.ml | 1 + .../test-suite/ocaml/varargs_runme.ml | 1 + .../test-suite/ocaml/voidtest_runme.ml | 1 + 15 files changed, 14 insertions(+), 233 deletions(-) diff --git a/SWIG/Examples/test-suite/ocaml/Makefile.in b/SWIG/Examples/test-suite/ocaml/Makefile.in index 80c2c03d8..44e887319 100644 --- a/SWIG/Examples/test-suite/ocaml/Makefile.in +++ b/SWIG/Examples/test-suite/ocaml/Makefile.in @@ -15,7 +15,7 @@ C_TEST_CASES = run_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ ocamlc -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ - ocamlc -custom -g -cc '$(CXX)' -o runme $(srcdir)/$*\.cmo $(srcdir)/$*\_runme.cmo $(srcdir)/$*\_wrap.o ; \ + ocamlc swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$*\.cmo $(srcdir)/$*\_runme.cmo $(srcdir)/$*\_wrap.o ; \ ./runme) ; \ fi ; diff --git a/SWIG/Examples/test-suite/ocaml/class_ignore_runme.ml b/SWIG/Examples/test-suite/ocaml/class_ignore_runme.ml index 846643aa8..518930527 100644 --- a/SWIG/Examples/test-suite/ocaml/class_ignore_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/class_ignore_runme.ml @@ -1,3 +1,4 @@ +open Swig open Class_ignore let a = new_Bar C_void diff --git a/SWIG/Examples/test-suite/ocaml/minherit_runme.ml b/SWIG/Examples/test-suite/ocaml/minherit_runme.ml index 8e6d23eef..29a37f43a 100644 --- a/SWIG/Examples/test-suite/ocaml/minherit_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/minherit_runme.ml @@ -1,4 +1,5 @@ (* Stolen from the python tests *) +open Swig open Minherit let a = new_Foo C_void diff --git a/SWIG/Examples/test-suite/ocaml/name_runme.ml b/SWIG/Examples/test-suite/ocaml/name_runme.ml index 902466c69..884607e82 100644 --- a/SWIG/Examples/test-suite/ocaml/name_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/name_runme.ml @@ -1,3 +1,4 @@ +open Swig open Name let _ = if (get_int _Baz_2) - (get_int (_bar_2 C_void)) == 30 diff --git a/SWIG/Examples/test-suite/ocaml/newobject1_runme.ml b/SWIG/Examples/test-suite/ocaml/newobject1_runme.ml index 247545690..c7d66c148 100644 --- a/SWIG/Examples/test-suite/ocaml/newobject1_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/newobject1_runme.ml @@ -1,3 +1,4 @@ +open Swig open Newobject1 exception RuntimeError of string * int diff --git a/SWIG/Examples/test-suite/ocaml/overload_copy_runme.ml b/SWIG/Examples/test-suite/ocaml/overload_copy_runme.ml index c48f15b17..c7839aeea 100644 --- a/SWIG/Examples/test-suite/ocaml/overload_copy_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/overload_copy_runme.ml @@ -1,3 +1,4 @@ +open Swig open Overload_copy let f = new_Foo C_void diff --git a/SWIG/Examples/test-suite/ocaml/results b/SWIG/Examples/test-suite/ocaml/results index 787976cd4..e69de29bb 100644 --- a/SWIG/Examples/test-suite/ocaml/results +++ b/SWIG/Examples/test-suite/ocaml/results @@ -1,232 +0,0 @@ -Failed: -director_abstract.cpptest -template_array_numeric.cpptest -typedef_inherit.cpptest -template_typedef_import.multicpptest -Success: -abstract_inherit.cpptest -abstract_inherit_ok.cpptest -abstract_signature.cpptest -abstract_typedef.cpptest -abstract_typedef2.cpptest -abstract_virtual.cpptest -add_link.cpptest -anonymous_arg.cpptest -anonymous_bitfield.cpptest -argout.cpptest -arrayref.cpptest -arrays_dimensionless.cpptest -arrays_global.cpptest -arrays_global_twodim.cpptest -arrays_scope.cpptest -bloody_hell.cpptest -bool_default.cpptest -bools.cpptest -casts.cpptest -cast_operator.cpptest -class_ignore.cpptest -class_scope_weird.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_cast.cpptest -default_char.cpptest -default_constructor.cpptest -default_ns.cpptest -default_ref.cpptest -director_basic.cpptest -director_exception.cpptest -director_finalizer.cpptest -director_unroll.cpptest -director_wombat.cpptest -dynamic_cast.cpptest -enum_plus.cpptest -enum_scope.cpptest -enum_scope_template.cpptest -enum_var.cpptest -evil_diamond.cpptest -evil_diamond_ns.cpptest -evil_diamond_prop.cpptest -extend_placement.cpptest -extend_template.cpptest -extend_template_ns.cpptest -extern_throws.cpptest -global_ns_arg.cpptest -grouping.cpptest -ignore_parameter.cpptest -import_nomodule.cpptest -inherit_missing.cpptest -inline_initializer.cpptest -kind.cpptest -lib_carrays.cpptest -lib_cdata.cpptest -lib_cpointer.cpptest -lib_std_deque.cpptest -lib_std_pair.cpptest -lib_std_string.cpptest -lib_std_vector.cpptest -lib_typemaps.cpptest -long_long_apply.cpptest -member_template.cpptest -minherit.cpptest -name_cxx.cpptest -name_inherit.cpptest -namespace_enum.cpptest -namespace_extend.cpptest -namespace_nested.cpptest -namespace_spaces.cpptest -namespace_template.cpptest -namespace_typemap.cpptest -namespace_virtual_method.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 -reference_global_vars.cpptest -rename_default.cpptest -rename_scope.cpptest -return_value_scope.cpptest -rname.cpptest -smart_pointer_const.cpptest -smart_pointer_const2.cpptest -smart_pointer_multi.cpptest -smart_pointer_multi_typedef.cpptest -smart_pointer_namespace.cpptest -smart_pointer_not.cpptest -smart_pointer_overload.cpptest -smart_pointer_protected.cpptest -smart_pointer_rename.cpptest -smart_pointer_simple.cpptest -smart_pointer_static.cpptest -smart_pointer_typedef.cpptest -static_array_member.cpptest -static_const_member.cpptest -static_const_member_2.cpptest -struct_value.cpptest -template.cpptest -template_arg_replace.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_default_vw.cpptest -template_enum.cpptest -template_enum_ns_inherit.cpptest -template_enum_typedef.cpptest -template_explicit.cpptest -template_extend_overload.cpptest -template_extend_overload_2.cpptest -template_extend1.cpptest -template_extend2.cpptest -template_forward.cpptest -template_inherit.cpptest -template_inherit_abstract.cpptest -template_int_const.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_partial_arg.cpptest -template_qualifier.cpptest -template_ref_type.cpptest -template_rename.cpptest -template_retvalue.cpptest -template_specialization.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_array_member.cpptest -typedef_class.cpptest -typedef_funcptr.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.cpptest -valuewrapper_base.cpptest -valuewrapper_const.cpptest -valuewrapper_default.cpptest -varargs.cpptest -virtual_destructor.cpptest -voidtest.cpptest -arrayptr.ctest -arrays.ctest -char_constant.ctest -const_const.ctest -cpp_macro_noarg.ctest -defineop.ctest -defines.ctest -enums.ctest -function_typedef.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 -preproc_4.ctest -preproc_5.ctest -preproc_6.ctest -ret_by_value.ctest -sizeof_pointer.ctest -sneaky1.ctest -struct_rename.ctest -typemap_subst.ctest -unions.ctest -imports.multicpptest diff --git a/SWIG/Examples/test-suite/ocaml/sneaky1_runme.ml b/SWIG/Examples/test-suite/ocaml/sneaky1_runme.ml index 37678b38e..c03599bf7 100644 --- a/SWIG/Examples/test-suite/ocaml/sneaky1_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/sneaky1_runme.ml @@ -1,5 +1,6 @@ (* Stolen from ruby test cases *) +open Swig open Sneaky1 let x = Sneaky1._add (C_list [ C_int 3; C_int 4 ]) diff --git a/SWIG/Examples/test-suite/ocaml/throw_exception_runme.ml b/SWIG/Examples/test-suite/ocaml/throw_exception_runme.ml index 49ce884c4..8781926b6 100644 --- a/SWIG/Examples/test-suite/ocaml/throw_exception_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/throw_exception_runme.ml @@ -1,5 +1,6 @@ (* Throw exception test *) +open Swig open Throw_exception let x = new_Foo C_void ;; diff --git a/SWIG/Examples/test-suite/ocaml/typedef_mptr_runme.ml b/SWIG/Examples/test-suite/ocaml/typedef_mptr_runme.ml index 896a2db65..3bdaac4ba 100644 --- a/SWIG/Examples/test-suite/ocaml/typedef_mptr_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/typedef_mptr_runme.ml @@ -1,3 +1,4 @@ +open Swig open Typedef_mptr let soci x = (string_of_int (get_int x)) diff --git a/SWIG/Examples/test-suite/ocaml/typename_runme.ml b/SWIG/Examples/test-suite/ocaml/typename_runme.ml index 15b5eac25..01f49de72 100644 --- a/SWIG/Examples/test-suite/ocaml/typename_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/typename_runme.ml @@ -1,5 +1,6 @@ (* Fun with type names -- stolen from the ruby runme *) +open Swig open Typename let f = new_Foo C_void diff --git a/SWIG/Examples/test-suite/ocaml/unions_runme.ml b/SWIG/Examples/test-suite/ocaml/unions_runme.ml index e9f16ca70..cbf1628ac 100644 --- a/SWIG/Examples/test-suite/ocaml/unions_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/unions_runme.ml @@ -1,5 +1,6 @@ (* Test the unions example... *) +open Swig open Unions let a = new_SmallStruct C_void diff --git a/SWIG/Examples/test-suite/ocaml/using_protected_runme.ml b/SWIG/Examples/test-suite/ocaml/using_protected_runme.ml index e6c263663..4dc4fe1c9 100644 --- a/SWIG/Examples/test-suite/ocaml/using_protected_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/using_protected_runme.ml @@ -1,3 +1,4 @@ +open Swig open Using_protected let f = new_FooBar C_void diff --git a/SWIG/Examples/test-suite/ocaml/varargs_runme.ml b/SWIG/Examples/test-suite/ocaml/varargs_runme.ml index b4cbe5282..52962d927 100644 --- a/SWIG/Examples/test-suite/ocaml/varargs_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/varargs_runme.ml @@ -1,5 +1,6 @@ (* Test case stolen from the python directory *) +open Swig open Varargs let _ = if _test (C_string "Hello") <> (C_string "Hello") then diff --git a/SWIG/Examples/test-suite/ocaml/voidtest_runme.ml b/SWIG/Examples/test-suite/ocaml/voidtest_runme.ml index 604165469..542ec3508 100644 --- a/SWIG/Examples/test-suite/ocaml/voidtest_runme.ml +++ b/SWIG/Examples/test-suite/ocaml/voidtest_runme.ml @@ -1,3 +1,4 @@ +open Swig open Voidtest let _ = _globalfunc C_void