new test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8ee20885b1
commit
131f153f70
4 changed files with 39 additions and 0 deletions
|
|
@ -208,6 +208,7 @@ CPP_TEST_CASES += \
|
||||||
template_ns_scope \
|
template_ns_scope \
|
||||||
template_qualifier \
|
template_qualifier \
|
||||||
template_qualifier \
|
template_qualifier \
|
||||||
|
template_ref_type \
|
||||||
template_rename \
|
template_rename \
|
||||||
template_retvalue \
|
template_retvalue \
|
||||||
template_specialization \
|
template_specialization \
|
||||||
|
|
|
||||||
6
Examples/test-suite/perl5/template_ref_type_runme.pl
Normal file
6
Examples/test-suite/perl5/template_ref_type_runme.pl
Normal file
|
|
@ -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);
|
||||||
5
Examples/test-suite/python/template_ref_type_runme.py
Normal file
5
Examples/test-suite/python/template_ref_type_runme.py
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import template_ref_type
|
||||||
|
|
||||||
|
xr = template_ref_type.XC()
|
||||||
|
y = template_ref_type.Y()
|
||||||
|
y.find(xr)
|
||||||
27
Examples/test-suite/template_ref_type.i
Normal file
27
Examples/test-suite/template_ref_type.i
Normal file
|
|
@ -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; }
|
||||||
|
};
|
||||||
|
%}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue