parent
8cf62a3325
commit
8e4868af75
5 changed files with 60 additions and 4 deletions
|
|
@ -23,3 +23,34 @@ if foo.a != "BIBI":
|
|||
raise RuntimeError
|
||||
if foo.getA() != "BIBI":
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
|
||||
class MyFoo(director_property.Foo):
|
||||
def setA(self, a):
|
||||
director_property.Foo.setA(self, a + " set from MyFoo")
|
||||
def setAByRef(self, a):
|
||||
director_property.Foo.setA(self, a + " setAByRef from MyFoo")
|
||||
|
||||
a = MyFoo()
|
||||
if (a.getA() != ""):
|
||||
raise RuntimeError("Test failed")
|
||||
a.setA("Hello")
|
||||
if (a.getA() != "Hello set from MyFoo"):
|
||||
raise RuntimeError("Test failed")
|
||||
a.setAByRef("Hello")
|
||||
if (a.getA() != "Hello setAByRef from MyFoo"):
|
||||
raise RuntimeError("Test failed")
|
||||
del a
|
||||
|
||||
a_original = MyFoo()
|
||||
a = director_property.Foo.get_self(a_original)
|
||||
if (a.getA() != ""):
|
||||
raise RuntimeError("Test failed")
|
||||
a.setA("Hello")
|
||||
if (a.getA() != "Hello set from MyFoo"):
|
||||
raise RuntimeError("Test failed")
|
||||
a.setAByRef("Hello")
|
||||
if (a.getA() != "Hello setAByRef from MyFoo"):
|
||||
raise RuntimeError("Test failed")
|
||||
del a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue