PageRenderTime 19ms CodeModel.GetById 12ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1from smart_pointer_simple import *
 2
 3f = Foo()
 4b = Bar(f)
 5
 6b.x = 3
 7if b.getx() != 3:
 8    raise RuntimeError
 9
10fp = b.__deref__()
11fp.x = 4
12if fp.getx() != 4:
13    raise RuntimeError