git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
30 lines
289 B
Python
30 lines
289 B
Python
from smart_pointer_member import *
|
|
|
|
f = Foo()
|
|
f.y = 1
|
|
|
|
if f.y != 1:
|
|
raise RuntimeError
|
|
|
|
b = Bar(f)
|
|
b.y = 2
|
|
|
|
if f.y != 2:
|
|
print f.y
|
|
print b.y
|
|
raise RuntimeError
|
|
|
|
if b.x != f.x:
|
|
raise RuntimeError
|
|
|
|
if b.z != f.z:
|
|
raise RuntimeError
|
|
|
|
if Foo.z == Bar.z:
|
|
raise RuntimeError
|
|
|
|
|
|
|
|
|
|
|
|
|