add test to confirm fix to sourceforge 3478922
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12990 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
068358da2f
commit
d12e7ecd9e
3 changed files with 34 additions and 1 deletions
|
|
@ -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 r_overload_array
|
||||
CPP_TEST_CASES = r_double_delete r_overload_array r_base_test
|
||||
|
||||
include $(srcdir)/../common.mk
|
||||
|
||||
|
|
|
|||
13
Examples/test-suite/r/r_base_test_runme.R
Normal file
13
Examples/test-suite/r/r_base_test_runme.R
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
source("unittest.R")
|
||||
dyn.load(paste("r_base_test", .Platform$dynlib.ext, sep=""))
|
||||
source("r_base_test.R")
|
||||
cacheMetaData(1)
|
||||
|
||||
b <- Base()
|
||||
Base_method(b)
|
||||
Base_overloaded_method(b)
|
||||
Base_overloaded_method(b, 43)
|
||||
Base_overloaded_method(b)
|
||||
b$method()
|
||||
|
||||
b$overloaded_method()
|
||||
20
Examples/test-suite/r_base_test.i
Normal file
20
Examples/test-suite/r_base_test.i
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* This test confirms the fix to sourceforge bug #3478922 */
|
||||
|
||||
%module r_base_test
|
||||
%inline %{
|
||||
class Base
|
||||
{
|
||||
public:
|
||||
|
||||
Base() : x(42) {}
|
||||
|
||||
int method() const { return x; }
|
||||
|
||||
void overloaded_method(int aArg) { x = aArg; }
|
||||
int overloaded_method() const { return x; }
|
||||
|
||||
private:
|
||||
|
||||
int x;
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue