aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite
diff options
context:
space:
mode:
authorDave Beazley <dave-swig@dabeaz.com>2003-06-03 19:08:09 +0000
committerDave Beazley <dave-swig@dabeaz.com>2003-06-03 19:08:09 +0000
commit131f153f708c738cf70bb1e9ea81e22314ddf851 (patch)
treef5075b28ad2d62471a5c52427847b84040b3e807 /Examples/test-suite
parent8ee20885b1f3fab7e91f1cc074edcf46c1e25cf2 (diff)
downloadswig-131f153f708c738cf70bb1e9ea81e22314ddf851.tar.gz
new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
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; }
+};
+%}
+