add another nested case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fc6be0dba0
commit
b20983d11c
2 changed files with 37 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ class B(FooBar_int):
|
|||
return "B::do_step;"
|
||||
|
||||
def get_value(self):
|
||||
return "B::get_value"
|
||||
return 1
|
||||
|
||||
pass
|
||||
|
||||
|
|
@ -34,3 +34,28 @@ b = B()
|
|||
if b.step() != "Bar::step;Foo::advance;B::do_advance;B::do_step;":
|
||||
raise RuntimeError,"Bad B virtual resolution"
|
||||
|
||||
|
||||
|
||||
class C(FooBar_int):
|
||||
def do_advance(self):
|
||||
return "C::do_advance;" + FooBar_int.do_advance(self)
|
||||
|
||||
def do_step(self):
|
||||
return "C::do_step;"
|
||||
|
||||
def get_value(self):
|
||||
return 2
|
||||
|
||||
def get_name(self):
|
||||
return FooBar_int.get_name(self) + " hello"
|
||||
|
||||
|
||||
pass
|
||||
|
||||
cc = C()
|
||||
|
||||
c = C.get_self(cc)
|
||||
c.advance()
|
||||
if c.get_name() != "FooBar::get_name hello":
|
||||
raise RuntimeError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue