diff options
author | Dave Beazley <dave-swig@dabeaz.com> | 2003-06-03 19:08:09 +0000 |
---|---|---|
committer | Dave Beazley <dave-swig@dabeaz.com> | 2003-06-03 19:08:09 +0000 |
commit | 131f153f708c738cf70bb1e9ea81e22314ddf851 (patch) | |
tree | f5075b28ad2d62471a5c52427847b84040b3e807 /Examples/test-suite | |
parent | 8ee20885b1f3fab7e91f1cc074edcf46c1e25cf2 (diff) | |
download | swig-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.mk | 1 | ||||
-rw-r--r-- | Examples/test-suite/perl5/template_ref_type_runme.pl | 6 | ||||
-rw-r--r-- | Examples/test-suite/python/template_ref_type_runme.py | 5 | ||||
-rw-r--r-- | Examples/test-suite/template_ref_type.i | 27 |
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; } +}; +%} + |