adding more cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7827 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3517fd7dea
commit
f666c7e749
2 changed files with 10 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ class Foo {
|
||||||
public:
|
public:
|
||||||
virtual ~Foo() {}
|
virtual ~Foo() {}
|
||||||
virtual std::string ping() { return "Foo::ping()"; }
|
virtual std::string ping() { return "Foo::ping()"; }
|
||||||
virtual std::string pong() { return "Foo::pong();" + ping(); }
|
virtual std::string pong(int val = 3) { return "Foo::pong();" + ping(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
Foo *launder(Foo *f) {
|
Foo *launder(Foo *f) {
|
||||||
|
|
@ -65,7 +65,7 @@ class Foo {
|
||||||
public:
|
public:
|
||||||
virtual ~Foo() {}
|
virtual ~Foo() {}
|
||||||
virtual std::string ping() { return "Foo::ping()"; }
|
virtual std::string ping() { return "Foo::ping()"; }
|
||||||
virtual std::string pong() { return "Foo::pong();" + ping(); }
|
virtual std::string pong(int val = 3) { return "Foo::pong();" + ping(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
Foo *launder(Foo *f);
|
Foo *launder(Foo *f);
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ if a.rg(2) != 2:
|
||||||
|
|
||||||
|
|
||||||
class PyClass(director_basic.MyClass):
|
class PyClass(director_basic.MyClass):
|
||||||
|
def method(self, vptr):
|
||||||
|
self.cmethod = 7
|
||||||
|
pass
|
||||||
|
|
||||||
def vmethod(self, b):
|
def vmethod(self, b):
|
||||||
b.x += 31
|
b.x += 31
|
||||||
return b
|
return b
|
||||||
|
|
@ -44,6 +48,10 @@ dd = director_basic.MyClass_get_self(d)
|
||||||
bc = cc.cmethod(b)
|
bc = cc.cmethod(b)
|
||||||
bd = dd.cmethod(b)
|
bd = dd.cmethod(b)
|
||||||
|
|
||||||
|
cc.method(b)
|
||||||
|
if c.cmethod != 7:
|
||||||
|
raise RuntimeError
|
||||||
|
|
||||||
if bc.x != 34:
|
if bc.x != 34:
|
||||||
raise RuntimeError
|
raise RuntimeError
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue