R - SF #3168676 Fix %rename not working for member variables and methods. Add new simple rename testcase with runtime tests for C# and R

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12432 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-02-04 23:42:06 +00:00
commit f4c74bc500
6 changed files with 79 additions and 1 deletions

View file

@ -0,0 +1,24 @@
%module rename_simple
%rename(NewStruct) OldStruct;
%rename(NewVariable) OldVariable;
%rename(NewInstanceMethod) OldInstanceMethod;
%rename(NewInstanceVariable) OldInstanceVariable;
%rename(NewStaticMethod) OldStaticMethod;
%rename(NewStaticVariable) OldStaticVariable;
%rename(NewFunction) OldFunction;
%rename(NewGlobalVariable) OldGlobalVariable;
%inline %{
struct OldStruct {
OldStruct() : OldInstanceVariable(111) {}
int OldInstanceVariable;
int OldInstanceMethod() { return 222; }
static int OldStaticVariable;
static int OldStaticMethod() { return 333; }
};
int OldStruct::OldStaticVariable = 444;
int OldFunction() { return 555; }
int OldGlobalVariable = 666;
%}