From 131f153f708c738cf70bb1e9ea81e22314ddf851 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Tue, 3 Jun 2003 19:08:09 +0000 Subject: new test git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4857 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/common.mk | 1 + .../test-suite/perl5/template_ref_type_runme.pl | 6 +++++ .../test-suite/python/template_ref_type_runme.py | 5 ++++ Examples/test-suite/template_ref_type.i | 27 ++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 Examples/test-suite/perl5/template_ref_type_runme.pl create mode 100644 Examples/test-suite/python/template_ref_type_runme.py create mode 100644 Examples/test-suite/template_ref_type.i (limited to 'Examples/test-suite') 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 Container { +public: + Container () {} + bool reset () { return false ;} +}; + +typedef Container XC; +%} + +%template(XC) Container; + +%inline %{ +class Y { +public: + Y () {}; + bool find (XC &) { return false; } +}; +%} + -- cgit v1.2.3