aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite')
-rw-r--r--Examples/test-suite/common.mk1
-rw-r--r--Examples/test-suite/perl5/template_ref_type_runme.pl6
-rw-r--r--Examples/test-suite/python/template_ref_type_runme.py5
-rw-r--r--Examples/test-suite/template_ref_type.i27
4 files changed, 39 insertions, 0 deletions
diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk
index 7b4381ec5..2ac4eaa75 100644
--- a/Examples/test-suite/common.mk
+++ b/Examples/test-suite/common.mk
@@ -208,6 +208,7 @@ CPP_TEST_CASES += \
template_ns_scope \
template_qualifier \
template_qualifier \
+ template_ref_type \
template_rename \
template_retvalue \
template_specialization \
diff --git a/Examples/test-suite/perl5/template_ref_type_runme.pl b/Examples/test-suite/perl5/template_ref_type_runme.pl
new file mode 100644
index 000000000..ba6e2b901
--- /dev/null
+++ b/Examples/test-suite/perl5/template_ref_type_runme.pl
@@ -0,0 +1,6 @@
+use template_ref_type;
+
+my $xr = template_ref_type::XC->new();
+my $y = template_ref_type::Y->new();
+
+$y->find($xr);
diff --git a/Examples/test-suite/python/template_ref_type_runme.py b/Examples/test-suite/python/template_ref_type_runme.py
new file mode 100644
index 000000000..0b3e4dd26
--- /dev/null
+++ b/Examples/test-suite/python/template_ref_type_runme.py
@@ -0,0 +1,5 @@
+import template_ref_type
+
+xr = template_ref_type.XC()
+y = template_ref_type.Y()
+y.find(xr)
diff --git a/Examples/test-suite/template_ref_type.i b/Examples/test-suite/template_ref_type.i
new file mode 100644
index 000000000..a41d006ef
--- /dev/null
+++ b/Examples/test-suite/template_ref_type.i
@@ -0,0 +1,27 @@
+%module template_ref_type
+
+%inline %{
+class X {
+public:
+ unsigned _i;
+};
+
+template <class T> class Container {
+public:
+ Container () {}
+ bool reset () { return false ;}
+};
+
+typedef Container<X> XC;
+%}
+
+%template(XC) Container<X>;
+
+%inline %{
+class Y {
+public:
+ Y () {};
+ bool find (XC &) { return false; }
+};
+%}
+