swig/Examples/test-suite/ocaml
William S Fulton e8d3c74590 Improvements to $typemap() special variable replacement overrides
In $typemap(), the $n special variables are replaced by the appropriate
value for the type associated with the typemap calling $typemap().
The (undocumented) special variable overrides now also support
controlling what the $n special variables are replaced with from the
calling typemap, for example:

  %typemap(in) std::pair<std::string, int> {
    int& input_value_second = $1.second;
    $typemap(in, int, 1=input_value_second);
    ...
  }

replaces $1 in the int typemap with input_value_second instead of
whatever is the default for the target language (a variable that holds
the int value after marshalling from the target language).

This additional functionality might make it possible to replace the C++
templates used in the UTL with a much simpler system of typemaps utilising
$typemap(). See follow on commit to typemaps.c.
2023-11-03 09:07:51 +00:00
..
Makefile.in Add machinery for C++14, C++17 and C++20 testing 2022-07-26 15:28:51 +12:00
README The great merge 2002-11-30 22:01:28 +00:00
abstract_access_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
abstract_typedef2_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
abstract_typedef_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
abstract_virtual_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
aggregate_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
allowexcept_runme.ml [OCaml] Fix %allowexception 2019-01-22 07:51:45 -07:00
cast_operator_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
catches_runme.ml [OCaml] Some exception improvements 2019-02-07 16:25:10 -07:00
catches_strings_runme.ml std::string throws typemaps 2022-09-19 09:09:29 +01:00
char_binary_runme.ml [OCaml] Fix the char_binary test for OCaml 2019-01-29 09:18:30 -07:00
char_constant_runme.ml [OCaml] Fix the wrapping of static const member chars 2019-01-15 16:37:26 -07:00
chartest_runme.ml [OCaml] Fix the wrapping of static const member chars 2019-01-15 16:37:26 -07:00
class_ignore_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
class_scope_weird_runme.ml [OCaml] class_scope_weird, cpp_static, and ignore_parameter runtime tests 2019-01-11 19:35:17 +00:00
constover_runme.ml [OCaml] Runtime tests for abstract_access, abstract_typedef and some others 2019-01-11 22:26:11 -07:00
constructor_rename_runme.ml [OCaml] Runtime tests for constructor_rename, cpp_nodefault and some others 2019-01-13 22:44:31 -07:00
conversion_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
cpp_nodefault_runme.ml [OCaml] Fix segfaults when too few arguments are passed to a function 2019-02-15 01:17:15 -07:00
cpp_static_runme.ml [OCaml] class_scope_weird, cpp_static, and ignore_parameter runtime tests 2019-01-11 19:35:17 +00:00
default_arg_values_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
default_args_runme.ml [OCaml] Fix segfaults when too few arguments are passed to a function 2019-02-15 01:17:15 -07:00
director_default_runme.ml [OCaml] Fix a bug in the ctors of director classes 2019-02-05 13:35:43 -07:00
director_exception_catches_runme.ml [OCaml] Fix handling of exception specifications for director classes 2019-01-26 05:58:38 -07:00
director_exception_nothrow_runme.ml [OCaml] Fix handling of exception specifications for director classes 2019-01-26 05:58:38 -07:00
director_exception_runme.ml [OCaml] Some exception improvements 2019-02-07 16:25:10 -07:00
director_frob_runme.ml [OCaml] Fix director_pass_by_value 2019-02-04 11:29:54 -07:00
director_ignore_runme.ml [OCaml] Fix handling of exception specifications for director classes 2019-01-26 05:58:38 -07:00
director_pass_by_value_runme.ml Performance optimisation for directors for classes passed by value 2022-07-04 11:19:29 +01:00
director_unroll_runme.ml [OCaml] Fix possible GC issues in generated director code 2019-02-07 22:08:10 -07:00
dynamic_cast_runme.ml [OCaml] Fix the dynamic_cast test 2019-02-14 02:21:36 -07:00
enum_rename_runme.ml Fix OCaml %rename for enum items 2022-10-05 22:42:17 +01:00
exception_classname_runme.ml [OCaml] Some exception improvements 2019-02-07 16:25:10 -07:00
exception_order_runme.ml [OCaml] Fix segfaults when too few arguments are passed to a function 2019-02-15 01:17:15 -07:00
extend_constructor_destructor_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
extend_placement_runme.ml [OCaml] Add a typecheck typemap for SWIGTYPE 2019-02-16 01:07:31 -07:00
extend_runme.ml [OCaml] Runtime tests for constructor_rename, cpp_nodefault and some others 2019-01-13 22:44:31 -07:00
extend_special_variables_runme.ml [OCaml] Runtime tests for constructor_rename, cpp_nodefault and some others 2019-01-13 22:44:31 -07:00
extend_template_method_runme.ml [OCaml] Fix reference typemaps for std::string 2023-04-21 09:39:59 +12:00
extend_template_runme.ml [OCaml] Runtime tests for constructor_rename, cpp_nodefault and some others 2019-01-13 22:44:31 -07:00
extend_typedef_class_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
extern_c_runme.ml [OCaml] Runtime tests for constructor_rename, cpp_nodefault and some others 2019-01-13 22:44:31 -07:00
funcptr_cpp_runme.ml [OCaml] Don't use argout typemaps by default for some reference types 2019-02-09 22:04:46 -07:00
fvirtual_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
global_ns_arg_runme.ml [OCaml] Fix segfaults when too few arguments are passed to a function 2019-02-15 01:17:15 -07:00
global_vars_runme.ml [OCaml] Fix the wrapmacro test 2019-02-17 01:41:59 -07:00
ignore_parameter_runme.ml [OCaml] class_scope_weird, cpp_static, and ignore_parameter runtime tests 2019-01-11 19:35:17 +00:00
imports_runme.ml Runtime test for multimodule import. 2004-10-17 08:39:52 +00:00
inctest_runme.ml [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others 2019-01-22 22:50:40 -07:00
inherit_missing_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
inout_runme.ml [OCaml] Add missing INPUT, OUTPUT, and INOUT typemaps for primitives 2019-02-18 04:23:40 -07:00
li_cpointer_cpp_runme.ml [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others 2019-01-22 22:50:40 -07:00
li_std_except_runme.ml [OCaml] Some exception improvements 2019-02-07 16:25:10 -07:00
li_std_string_runme.ml Expand li_std_string_runme.* 2023-05-12 16:05:48 +12:00
li_std_vector_runme.ml OCaml's classHandler() requires name, not sym:name. 2019-01-08 20:10:07 -07:00
makedebugtop Remove execute permissions from various non-executable files 2014-05-02 20:06:11 +02:00
memberin_extend_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
minherit_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
mod_runme.ml [Ocaml] Add mod_runme.ml 2022-10-19 07:42:11 +13:00
multivalue_runme.ml [OCaml] Add missing INPUT, OUTPUT, and INOUT typemaps for primitives 2019-02-18 04:23:40 -07:00
name_runme.ml Uniform SWIGSTATIC on all prototypes. 2004-11-04 04:17:00 +00:00
namespace_virtual_method_runme.ml [OCaml] Runtime tests for template_opaque, using_extend and some others 2019-01-27 06:50:51 -07:00
newobject1_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
newobject2_runme.ml [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others 2019-01-22 22:50:40 -07:00
overload_bool_runme.ml [OCaml] Don't use argout typemaps by default for some reference types 2019-02-09 22:04:46 -07:00
overload_copy_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
overload_extend_runme.ml [OCaml] Fix dead code generation in overloaded function wrappers 2019-01-16 20:00:40 -07:00
overload_method_runme.ml [OCaml] Runtime tests for overload_method, typedef_class and some others 2019-01-20 23:08:03 -07:00
overload_numeric_runme.ml [OCaml] Some %typecheck precedence tweaks 2019-01-21 23:17:43 -07:00
overload_polymorphic_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
overload_rename_runme.ml [OCaml] Fix dead code generation in overloaded function wrappers 2019-01-16 20:00:40 -07:00
overload_subtype_runme.ml [OCaml] Fix dead code generation in overloaded function wrappers 2019-01-16 20:00:40 -07:00
overload_template_runme.ml [OCaml] Add a typecheck typemap for SWIGTYPE 2019-02-16 01:07:31 -07:00
primitive_ref_runme.ml [OCaml] Don't use argout typemaps by default for some reference types 2019-02-09 22:04:46 -07:00
reference_global_vars_runme.ml [OCaml] Fix the wrapmacro test 2019-02-17 01:41:59 -07:00
rename_predicates_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
rename_rstrip_encoder_runme.ml Complete copy of testcase from Python 2022-12-30 23:49:07 +00:00
sizet_runme.ml [OCaml] Fix the wrapmacro test 2019-02-17 01:41:59 -07:00
sneaky1_runme.ml fix for perl keyword 2006-03-07 23:05:11 +00:00
special_variable_macros_runme.ml Improvements to $typemap() special variable replacement overrides 2023-11-03 09:07:51 +00:00
special_variables_runme.ml [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others 2019-01-22 22:50:40 -07:00
static_const_member_runme.ml [OCaml] Fix the wrapping of static const member chars 2019-01-15 16:37:26 -07:00
string_simple_runme.ml [OCaml] Fix and re-enable the string_simple, minherit, and unions tests 2019-01-13 17:28:00 -07:00
struct_value_runme.ml [OCaml] Fix member var getters and setters 2019-01-06 09:40:25 -07:00
swig_exception_runme.ml [OCaml] Some exception improvements 2019-02-07 16:25:10 -07:00
template_default_arg_overloaded_extend_runme.ml [OCaml] Add a typecheck typemap for SWIGTYPE 2019-02-16 01:07:31 -07:00
template_default_arg_runme.ml [OCaml] Add a typecheck typemap for SWIGTYPE 2019-02-16 01:07:31 -07:00
template_extend1_runme.ml [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others 2019-01-22 22:50:40 -07:00
template_extend2_runme.ml [OCaml] Runtime tests for inctest, li_cpointer_cpp and some others 2019-01-22 22:50:40 -07:00
template_inherit_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
template_methods_runme.ml [OCaml] Fix reference typemaps for std::string 2023-04-21 09:39:59 +12:00
template_opaque_runme.ml [OCaml] Runtime tests for template_opaque, using_extend and some others 2019-01-27 06:50:51 -07:00
template_ref_type_runme.ml [OCaml] Don't use argout typemaps by default for some reference types 2019-02-09 22:04:46 -07:00
template_rename_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
template_tbase_template_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
throw_exception_runme.ml [OCaml] Fix segfaults when too few arguments are passed to a function 2019-02-15 01:17:15 -07:00
typedef_class_runme.ml [OCaml] Runtime tests for overload_method, typedef_class and some others 2019-01-20 23:08:03 -07:00
typedef_classforward_same_name_runme.ml [OCaml] Runtime tests for default_arg_values, inherit_missing and some others 2019-02-01 12:59:29 -07:00
typedef_inherit_runme.ml Polymorphism in R wrappers fixed for C++ structs 2022-10-24 08:56:55 +01:00
typedef_mptr_runme.ml [OCaml] Fix and re-enable typedef_mptr_runme.ml 2019-02-05 20:10:06 -07:00
typedef_reference_runme.ml [OCaml] Fix the wrapmacro test 2019-02-17 01:41:59 -07:00
typemap_arrays_runme.ml [OCaml] Fix segfaults when too few arguments are passed to a function 2019-02-15 01:17:15 -07:00
typemap_delete_runme.ml [OCaml] Runtime tests for overload_method, typedef_class and some others 2019-01-20 23:08:03 -07:00
typename_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
types_directive_runme.ml [OCaml] Runtime tests for overload_method, typedef_class and some others 2019-01-20 23:08:03 -07:00
unions_runme.ml [OCaml] Fix and re-enable the string_simple, minherit, and unions tests 2019-01-13 17:28:00 -07:00
using1_runme.ml [OCaml] Runtime tests for fvirtual, overload_polymorphic and some others 2019-01-17 15:58:48 -07:00
using2_runme.ml [OCaml] Runtime tests for rename_rstrip_encoder and using2 2022-12-04 19:37:22 -08:00
using_extend_runme.ml [OCaml] Runtime tests for template_opaque, using_extend and some others 2019-01-27 06:50:51 -07:00
using_inherit_runme.ml [OCaml] Runtime tests for template_opaque, using_extend and some others 2019-01-27 06:50:51 -07:00
using_pointers_runme.ml [OCaml] Runtime tests for template_opaque, using_extend and some others 2019-01-27 06:50:51 -07:00
using_private_runme.ml [OCaml] Runtime tests for template_opaque, using_extend and some others 2019-01-27 06:50:51 -07:00
using_protected_runme.ml [OCaml] Re-enable the using_protected unit test 2019-01-11 17:59:23 -07:00
valuewrapper_runme.ml [OCaml] Runtime tests for overload_method, typedef_class and some others 2019-01-20 23:08:03 -07:00
varargs_overload_runme.ml Fix Python compile errors with overloading and varargs 2019-02-25 19:27:23 +00:00
varargs_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
voidtest_runme.ml Changed test cases to open Swig. 2003-10-25 21:17:06 +00:00
wrapmacro_runme.ml [OCaml] Fix the wrapmacro test 2019-02-17 01:41:59 -07:00

README

I stole most of these runme's from the ruby runme scripts, since the current
ocaml interface mirrors the ruby interface in many ways.