more %rename/%ignore tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6706 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-11-09 21:27:02 +00:00
commit 0b150a96bb
3 changed files with 13 additions and 0 deletions

View file

@ -76,6 +76,10 @@
%rename(bar2) Foo::bar;
%rename(newname) Foo::oldname(int x = 1234);
%ignore Foo::Foo(int x, int y = 0, int z = 0);
%ignore Foo::meth(int x, int y = 0, int z = 0);
%rename(renamed3arg) Foo::renameme(int x, double d) const;
%rename(renamed2arg) Foo::renameme(int x) const;
%rename(renamed1arg) Foo::renameme() const;
%inline %{
@ -88,6 +92,8 @@
Foo(){}
Foo(int x, int y = 0, int z = 0){}
void meth(int x, int y = 0, int z = 0){}
// Use a renamed member as a default argument. SWIG has to resolve
// bar to Foo::bar and not Foo::spam. SWIG-1.3.11 got this wrong.
@ -99,6 +105,7 @@
// test the method itself being renamed
void oldname(int x = 1234) {}
void renameme(int x = 1234, double d=123.4) const {}
};
int Foo::bar = 1;
int Foo::spam = 2;