PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/python/pointer_reference_runme.py

#
Python | 16 lines | 12 code | 4 blank | 0 comment | 4 complexity | d37f30c22c0d9363ac1b58b790614927 MD5 | raw file
 1import pointer_reference
 2
 3s = pointer_reference.get()
 4if s.value != 10:
 5  raise RuntimeError, "get test failed"
 6
 7ss = pointer_reference.Struct(20)
 8pointer_reference.set(ss)
 9if pointer_reference.cvar.Struct_instance.value != 20:
10  raise RuntimeError, "set test failed"
11
12if pointer_reference.overloading(1) != 111:
13  raise RuntimeError, "overload test 1 failed"
14
15if pointer_reference.overloading(ss) != 222:
16  raise RuntimeError, "overload test 2 failed"