From 29e402fedfe720c05a2551ccf8505f07976ca887 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 26 Oct 2005 09:10:59 +0000 Subject: [PATCH] add iadd test case git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7735 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/test-suite/python/.cvsignore | 55 +++++++++++++------ SWIG/Examples/test-suite/python/Makefile.in | 4 ++ SWIG/Examples/test-suite/python/iadd.i | 6 -- SWIG/Examples/test-suite/python/iadd_runme.py | 4 ++ 4 files changed, 47 insertions(+), 22 deletions(-) diff --git a/SWIG/Examples/test-suite/python/.cvsignore b/SWIG/Examples/test-suite/python/.cvsignore index 9f5d12dab..6aa5902b5 100644 --- a/SWIG/Examples/test-suite/python/.cvsignore +++ b/SWIG/Examples/test-suite/python/.cvsignore @@ -6,13 +6,17 @@ callback.py complextest.py director_stl.py director_thread.py +director_wstring.py +extend_variable.py file_test.py -implicittest.py +iadd.py inout.py input.py inplaceadd.py kwargs.py li_cstring.py +li_cwstring.py +li_implicit.py li_std_except.py li_std_vectora.py li_std_map.py @@ -24,6 +28,7 @@ primitive_types.py std_containers.py swigobject.py template_matrix.py +virtual_derivation.py simutry.py abstract_access.py abstract_inherit.py @@ -58,6 +63,7 @@ constructor_exception.py constructor_explicit.py constructor_value.py contract.py +compactdefaultargs.py conversion.py conversion_namespace.py conversion_ns_template.py @@ -89,7 +95,9 @@ director_redefined.py director_string.py director_unroll.py director_wombat.py +disown.py dynamic_cast.py +empty.py enum_plus.py enum_scope_template.py enum_template.py @@ -112,11 +120,14 @@ global_vars.py grouping.py ignore_parameter.py import_nomodule.py +inherit.py inherit_missing.py inherit_same_name.py inherit_void_arg.py inline_initializer.py kind.py +langobj.py +li_attribute.py li_carrays.py li_cdata.py li_cpointer.py @@ -156,6 +167,7 @@ private_assign.py protected_rename.py pure_virtual.py redefined.py +refcount.py reference_global_vars.py register_par.py rename_scope.py @@ -251,6 +263,7 @@ typedef_inherit.py typedef_mptr.py typedef_reference.py typedef_scope.py +typedef_struct.py typemap_namespace.py typemap_ns_using.py typemap_numinputs.py @@ -278,13 +291,16 @@ voidtest.py wrapmacro.py file_test.py li_cstring.py +li_cwstring.py nondynamic.py arrays.py char_constant.py const_const.py +empty.py enums.py extern_declaration.py function_typedef.py +immutable.py inctest.py lextype.py li_carrays.py @@ -304,21 +320,25 @@ ret_by_value.py sizeof_pointer.py sneaky1.py struct_rename.py +typedef_struct.py typemap_subst.py unions.py argcargvtest_runme.py -attributetest_runme.py callback_runme.py complextest_runme.py director_stl_runme.py director_thread_runme.py +director_wstring_runme.py +extend_variable_runme.py file_test_runme.py -implicittest_runme.py +iadd_runme.py inout_runme.py input_runme.py inplaceadd_runme.py kwargs_runme.py li_cstring_runme.py +li_cwstring_runme.py +li_implicit_runme.py li_std_map_runme.py li_std_stream_runme.py li_std_wstream_runme.py @@ -328,6 +348,7 @@ primitive_types_runme.py std_containers_runme.py swigobject_runme.py template_matrix_runme.py +virtual_derivation_runme.py abstract_access_runme.py abstract_typedef_runme.py abstract_typedef2_runme.py @@ -338,6 +359,7 @@ class_ignore_runme.py class_scope_weird_runme.py constover_runme.py contract_runme.py +compactdefaultargs_runme.py cpp_enum_runme.py cpp_namespace_runme.py default_constructor_runme.py @@ -354,7 +376,9 @@ director_nested_runme.py director_protected_runme.py director_string_runme.py director_unroll_runme.py +disown_runme.py dynamic_cast_runme.py +empty_runme.py enum_template_runme.py exception_order_runme.py extend_placement_runme.py @@ -364,7 +388,12 @@ friends_runme.py global_vars_runme.py grouping_runme.py import_nomodule_runme.py +inherit_runme.py inherit_missing_runme.py +langobj_runme.py +li_attribute_runme.py +li_carrays_runme.py +li_cpointer_runme.py li_std_pair_runme.py li_std_string_runme.py li_std_vector_runme.py @@ -379,6 +408,7 @@ overload_simple_runme.py overload_subtype_runme.py overload_template_runme.py primitive_ref_runme.py +refcount_runme.py reference_global_vars_runme.py rename_scope_runme.py return_const_value_runme.py @@ -431,9 +461,15 @@ voidtest_runme.py wrapmacro_runme.py file_test_runme.py li_cstring_runme.py +li_cwstring_runme.py nondynamic_runme.py +arrays_runme.py +empty_runme.py enums_runme.py inctest_runme.py +li_carrays_runme.py +li_cmalloc_runme.py +li_cpointer_runme.py name_runme.py nested_runme.py overload_extend_runme.py @@ -447,16 +483,3 @@ clientdata_prop_a.py clientdata_prop_b.py imports_a.py imports_b.py -template_typedef_import.py -li_cwstring.py -compactdefaultargs.py -refcount.py -li_implicit.py -director_wstring.py -immutable.py -inherit.py -empty.py -virtual_derivation.py -langobj.py -li_attribute.py -typedef_struct.py diff --git a/SWIG/Examples/test-suite/python/Makefile.in b/SWIG/Examples/test-suite/python/Makefile.in index 500556fa7..a2aa85d33 100644 --- a/SWIG/Examples/test-suite/python/Makefile.in +++ b/SWIG/Examples/test-suite/python/Makefile.in @@ -92,3 +92,7 @@ cvsignore: @echo Makefile @for i in ${CPP_TEST_CASES} ${C_TEST_CASES}; do echo $$i.py; done @for i in ${CPP_TEST_CASES} ${C_TEST_CASES}; do if grep -q $${i}_runme.py CVS/Entries ; then echo $${i}_runme.py; fi; done + @echo clientdata_prop_a.py + @echo clientdata_prop_b.py + @echo imports_a.py + @echo imports_b.py diff --git a/SWIG/Examples/test-suite/python/iadd.i b/SWIG/Examples/test-suite/python/iadd.i index 81afa12a2..76604c027 100644 --- a/SWIG/Examples/test-suite/python/iadd.i +++ b/SWIG/Examples/test-suite/python/iadd.i @@ -9,10 +9,4 @@ class Foo; %attribute_ref(test::Foo, long, AsLong); -%typemap(out) B & B::operator+= "hello"; - - - - - %include "iadd.h" diff --git a/SWIG/Examples/test-suite/python/iadd_runme.py b/SWIG/Examples/test-suite/python/iadd_runme.py index d0906d77f..fbeb0ec3e 100755 --- a/SWIG/Examples/test-suite/python/iadd_runme.py +++ b/SWIG/Examples/test-suite/python/iadd_runme.py @@ -1,5 +1,9 @@ import iadd f = iadd.Foo() + +f.AsA.x = 3 f.AsA += f.AsA +if f.AsA.x != 6: + raise RuntimeError