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

# · Python · 29 lines · 20 code · 9 blank · 0 comment · 4 complexity · eb7e0dd30bf8898b33b1492efbf22e29 MD5 · raw file

  1. import voidtest
  2. voidtest.globalfunc()
  3. f = voidtest.Foo()
  4. f.memberfunc()
  5. voidtest.Foo_staticmemberfunc()
  6. def fvoid():
  7. pass
  8. if f.memberfunc() != fvoid():
  9. raise RuntimeError
  10. v1 = voidtest.vfunc1(f)
  11. v2 = voidtest.vfunc2(f)
  12. if v1 != v2:
  13. raise RuntimeError
  14. v3 = voidtest.vfunc3(v1)
  15. if v3.this != f.this:
  16. raise RuntimeError
  17. v4 = voidtest.vfunc1(f)
  18. if v4 != v1:
  19. raise RuntimeError
  20. v3.memberfunc()