add new test for rename
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8154 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
41947a37e8
commit
d0a5fe3ba5
1 changed files with 31 additions and 0 deletions
31
SWIG/Examples/test-suite/rename_camel.i
Normal file
31
SWIG/Examples/test-suite/rename_camel.i
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
%module rename_camel
|
||||
|
||||
|
||||
%define CamelCase "%(command:sed -e 's/\([a-z]\)/\U\\1/' -e 's/\(_\)\([a-z]\)/\U\\2/g' <<< %s)s" %enddef
|
||||
|
||||
|
||||
%rename("CamelCase1") camel_case_1;
|
||||
%rename("_%s") camel_case_2;
|
||||
%rename("%(mangle)s") camel_case_3;
|
||||
%rename("%(title)s") camel_case_4;
|
||||
%rename(CamelCase) camel_case;
|
||||
%rename(CamelCase) also_works_here;
|
||||
|
||||
%rename("%(title)s",match="enumitem") "*";
|
||||
|
||||
|
||||
%inline
|
||||
{
|
||||
int camel_case_1(int);
|
||||
int camel_case_2(int);
|
||||
int camel_case_3(int);
|
||||
int camel_case_4(int);
|
||||
int camel_case(int);
|
||||
int also_works_here(int);
|
||||
|
||||
enum HelloEnum {
|
||||
hi, hello
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue