/trunk/Examples/test-suite/python/smart_pointer_simple_runme.py
Python | 13 lines | 10 code | 3 blank | 0 comment | 2 complexity | 8f901caa413e205592086ad508fff751 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- from smart_pointer_simple import *
- f = Foo()
- b = Bar(f)
- b.x = 3
- if b.getx() != 3:
- raise RuntimeError
- fp = b.__deref__()
- fp.x = 4
- if fp.getx() != 4:
- raise RuntimeError