From c048546bde9a4f7dac57d482a43a4bbe6ddf73dc Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 11 Dec 2002 09:32:28 +0000 Subject: [PATCH] Added broken test for template + extend + overload git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4172 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/common.mk | 1 + .../test-suite/template_extend_overload.i | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Examples/test-suite/template_extend_overload.i diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index 3b2fc84ea..22e209066 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -46,6 +46,7 @@ CPP_TEST_BROKEN = \ abstract_typedef \ namespace_nested \ template_default_arg \ + template_extend_overload \ template_specialization_defarg \ template_specialization_enum \ using_namespace diff --git a/Examples/test-suite/template_extend_overload.i b/Examples/test-suite/template_extend_overload.i new file mode 100644 index 000000000..24ae48458 --- /dev/null +++ b/Examples/test-suite/template_extend_overload.i @@ -0,0 +1,45 @@ +%module template_extend_overload + + +%inline %{ + + template + struct A + { + }; + + template + struct B + { + }; +%} + + +%define __compose_unary(Class, ArgType, ResType) + Class compose(const B& f) + { + return Class(); + } +%enddef + +%define __compose_unary_3(Class, Type) +%extend Class +{ + __compose_unary(Class, Type, bool); + __compose_unary(Class, Type, double); + __compose_unary(Class, Type, int); +} +%enddef + +%define compose_unary(Class) + __compose_unary_3(Class, bool) + __compose_unary_3(Class, double) + __compose_unary_3(Class, int) +%enddef + +compose_unary(A); + +%template(A_double) A; +%template(A_int) A; +%template(A_bool) A; +