add new test case for r to test scalar/vector conflicts

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12927 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Joseph Wang 2012-03-17 18:37:51 +00:00
commit 023d597862
2 changed files with 17 additions and 1 deletions

View file

@ -11,7 +11,7 @@ top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
C_TEST_CASES = r_copy_struct r_legacy
CPP_TEST_CASES = r_double_delete
CPP_TEST_CASES = r_double_delete r_overload_array
include $(srcdir)/../common.mk

View file

@ -0,0 +1,16 @@
%module r_overload_array
%include "stl.i"
# this tests the situation in which there is a scalar function
# corresponding with a vector one
%inline %{
class Foo {
public:
double bar(double w) {return w;};
double bar(double *w) {return w[0];}
double bar(std::vector<double> w) {return w[0];}
};
%}