using for method with default args test added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6362 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
275cb78630
commit
38f86d7d0a
2 changed files with 8 additions and 0 deletions
|
|
@ -5,3 +5,9 @@ f.x = 3
|
|||
|
||||
if f.blah(4) != 4:
|
||||
raise RuntimeError, "blah(int)"
|
||||
|
||||
if f.defaulted() != -1:
|
||||
raise RuntimeError, "defaulted()"
|
||||
|
||||
if f.defaulted(222) != 222:
|
||||
raise RuntimeError, "defaulted(222)"
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ class Foo {
|
|||
public:
|
||||
int x;
|
||||
int blah(int x) { return x; }
|
||||
int defaulted(int i = -1) { return i; }
|
||||
};
|
||||
|
||||
class FooBar : private Foo {
|
||||
public:
|
||||
using Foo::blah;
|
||||
using Foo::x;
|
||||
using Foo::defaulted;
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue